About Color Picker
A designer hands you a hex code, your stylesheet uses HSL, and a print vendor asks for CMYK. This tool puts one color in all those notations at once. Drag in the square, move the hue slider, or paste any value you have, and every format updates together with a Copy button beside it.
It is also a quick accessibility check. Under the values, you get the color's contrast against white and against black, so you can tell straight away whether it can be used for text. Colors you copy are kept as swatches on this device, ready for your next visit.
How it works
The picker works in HSV, because a square of saturation against brightness is the most natural shape to drag across. When you type a color, it is stored exactly as you gave it, so #336699 stays that value and cannot pick up rounding as it passes through other formats. That hex code is rgb(51, 102, 153), or hsl(210, 50%, 40%).
OKLCH, written oklch(49.93% 0.0987 250.43) for the same color, comes from the published OKLab formulas. It is the newest format here and its lightness matches what eyes perceive much better than HSL does. CMYK, cmyk(67%, 33%, 0%, 40%), uses the plain mathematical conversion, so it is a starting point and not a print proof.
How to use Color Picker
- Drag inside the square to set saturation and brightness, or focus it and use the arrow keys.
- Move the Hue slider to change the color family, and the Opacity slider if you need transparency.
- Or paste a code, or a CSS name such as tomato, into the Type or paste any color box.
- For an exact value, edit the Red, Green and Blue boxes, or Hue, Saturation and Lightness.
- Press Copy next to the format you need. The color is saved under Colors you copied.
One color in every format
#336699rgb(51, 102, 153)
hsl(210, 50%, 40%)
oklch(49.93% 0.0987 250.43)
cmyk(67%, 33%, 0%, 40%)All of these describe the same color on an sRGB screen, and the output above comes from the tool's own functions. With the opacity below 100 percent, HEX gains two extra digits and RGB and HSL gain an alpha value.
When it helps
- Converting a brand's hex code into the HSL or OKLCH value your stylesheet uses.
- Finding a tint of a color by keeping its hue and moving only saturation or brightness.
- Checking at a glance whether a color can carry white or black text.
- Building a short list of candidate colors while you work on a design.
Tips for a better result
- To make a lighter version of a color, change only the lightness in HSL or OKLCH. The result stays in the same family.
- You can paste codes with or without the # sign, and the three digit shorthand works too.
- Keep your final color in hex or RGB if the design moves between tools, since those store exact 8-bit values.
Good to know
- Values are for sRGB, the standard web color space. It does not edit wide gamut colors such as display-p3.
- CMYK output ignores ink, paper and printer profiles. For print work, ask your printer for values or use a profile in design software.
- The box reads hex, rgb() and hsl() codes and CSS color names, which your own browser resolves. It does not take oklch() values, though OKLCH is provided as output.
- Saved swatches live in this browser only and do not follow you to another device. The Color Converter reads the same list.
Questions people ask
What is the difference between HEX and RGB?
Nothing but notation. Each writes the same red, green and blue amounts from 0 to 255: hex uses base 16 and rgb() uses ordinary decimal numbers.
When should I use HSL rather than HEX?
When you are making variations. In HSL you can change lightness alone to build hover states or tints, which is much harder to do by editing hex digits.
What is OKLCH for?
It is a color format whose lightness tracks human perception far more closely than HSL. Two colors with the same OKLCH lightness look about equally light, which makes consistent palettes easier to build.
How do I write a transparent color?
Lower the Opacity slider. The HEX field gains two more digits, such as #33669980, and the RGB value becomes rgba() with an alpha between 0 and 1.
What to use next
- Color Palette Generator: to build a matching set of colors from the one you picked
- Color Contrast Checker: to test the color against your actual background
- Image Color Picker: when the color you want is inside a photo or logo
Last reviewed . Read our editorial policy.