Skip to content
Embed

Paste this on your site. The attribution link is required and is what makes embedding free.

HTML Color Picker — Free Online Color Code Converter

Pick any color visually or enter a hex code and instantly get HEX, RGB, HSL, and CMYK values with CSS-ready code snippets for your web design and development projects.

Color Values

HEX#3B82F6
RGB59, 130, 246
HSL217, 91%, 60%
CMYK76%, 47%, 0%, 4%
CSS rgb()rgb(59, 130, 246)
CSS hsl()hsl(217, 91%, 60%)

Common HTML Color Reference Table

Color Name HEX RGB HSL Use Case
Tailwind Blue #3B82F6 59, 130, 246 217, 91%, 60% Links, primary actions
Success Green #10B981 16, 185, 129 160, 84%, 39% Success states, confirmations
Warning Amber #F59E0B 245, 158, 11 38, 92%, 50% Warnings, attention items
Error Red #EF4444 239, 68, 68 0, 84%, 60% Errors, destructive actions
Neutral Gray #6B7280 107, 114, 128 220, 9%, 46% Secondary text, borders
Pure White #FFFFFF 255, 255, 255 0, 0%, 100% Backgrounds, cards

Related Calculators

About this calculator

Color Conversion Formulas

HEX to RGB: R = parseInt(hex[1-2], 16), G = parseInt(hex[3-4], 16), B = parseInt(hex[5-6], 16)
RGB to HSL: H = arctan2 of color channels, S = delta / (1 - |2L - 1|), L = (max + min) / 2
RGB to CMYK: K = 1 - max(R/255, G/255, B/255), C = (1 - R/255 - K) / (1 - K)

Color Models Explained

  • HEX (Hexadecimal): A six-digit code representing red, green, and blue channels in base-16 notation. Each pair of digits ranges from 00 (0) to FF (255). The format is #RRGGBB. This is the most common color notation in web development and CSS.
  • RGB (Red, Green, Blue): An additive color model where red, green, and blue light are combined at varying intensities (0-255 each) to produce colors. When all channels are at 255, the result is white. When all are 0, the result is black. This model is used by all digital screens.
  • HSL (Hue, Saturation, Lightness): A more human-intuitive color model. Hue is the color angle on the wheel (0-360 degrees), saturation is the color's intensity (0-100%), and lightness is the brightness (0-100%). HSL makes it easy to find lighter or darker shades of the same color by adjusting only the lightness value.
  • CMYK (Cyan, Magenta, Yellow, Key/Black): A subtractive color model used in commercial printing. Each value represents the percentage of that ink color (0-100%). Higher values mean more ink. The conversion from RGB to CMYK is approximate since the two color spaces do not overlap perfectly.

Step-by-Step Conversion Example

Convert the hex color #3B82F6 (a medium blue) to all formats:

  1. HEX to RGB: R = 0x3B = 59, G = 0x82 = 130, B = 0xF6 = 246, so RGB = (59, 130, 246)
  2. RGB to HSL: Normalize values: rN=0.231, gN=0.510, bN=0.965. Max=0.965, min=0.231, delta=0.734. H = 217 degrees, S = 91%, L = 60%, so HSL = (217, 91%, 60%)
  3. RGB to CMYK: K = 1 - 0.965 = 0.035 (3%). C = (1 - 0.231 - 0.035) / 0.965 = 76%. M = 47%. Y = 0%. So CMYK = (76%, 47%, 0%, 4%)
  4. CSS Output: rgb(59, 130, 246) and hsl(217, 91%, 60%)

All these values describe the same color. Choosing which format to use depends on your application. Use HEX or rgb() for CSS, HSL for creating color palettes, and CMYK for print preparation.

Sources

Disclaimer: This calculator is for informational and educational purposes only. Results are estimates and may not reflect exact values.

Last updated: November 3, 2026