How it works
Pick a color with the swatch, move the hue, saturation and lightness sliders, or type or paste a code. The box accepts HEX (#1E90FF or #FFF), RGB (rgb(30, 144, 255)), HSL, HSV, CMYK and the 148 CSS color names, so it also works as a HEX to RGB or RGB to HEX converter.
Every format updates as you go, each with a copy button. Below them are five tints (mixed with white) and five shades (mixed with black), which are handy for hover states, borders and backgrounds. Tap one to make it the current color.
The tool also shows whether white or black text is readable on the color, using the WCAG contrast rules, and the nearest CSS color name. The link in your address bar always holds the current color, so you can share it.
Check it by hand: split #1E90FF into pairs, 1E, 90 and FF. In hex, 1E = 1 × 16 + 14 = 30, 90 = 9 × 16 + 0 = 144 and FF = 15 × 16 + 15 = 255, so the color is rgb(30, 144, 255). Lightness is the average of the largest and smallest channel, (255 + 30) ÷ 2 ÷ 255 = 55.9%, shown as 56%. Blue is the largest channel, so the hue is 60 × (4 + (30 − 144) ÷ 225) = 209.6, which rounds to 210. For CMYK, black is 1 − 255 ÷ 255 = 0, cyan is 1 − 30 ÷ 255 = 88%, magenta is 1 − 144 ÷ 255 = 44% and yellow is 1 − 255 ÷ 255 = 0%.
Worked example
Dodger blue is #1E90FF. In RGB it is rgb(30, 144, 255), in HSL hsl(210, 100%, 56%), and in CMYK about 88% cyan, 44% magenta, 0% yellow and 0% black.
Good to know
- CMYK values are a simple conversion without a printer profile. Your printer's own profile may give slightly different numbers.
- Transparency (alpha) in 8-digit HEX or rgba() codes is read, but the results show the solid color.
- Pick from screen works in Chrome and Edge on computers; other browsers do not offer it yet.
Questions people ask
How do I find the HEX code of a color?
Pick the color with the swatch or sliders and copy the HEX value. To get the code of a color in a picture, use Color Picker from Image.
How do I convert HEX to RGB?
Paste the HEX code, such as #1E90FF, into the box. The RGB value, rgb(30, 144, 255), appears straight away with a copy button. It works the other way round too.
What is the difference between RGB, HSL and CMYK?
RGB mixes red, green and blue light, as screens do. HSL describes the same colors by hue, saturation and lightness, which is easier to adjust by hand. CMYK is for printing with cyan, magenta, yellow and black ink.
What are tints and shades?
A tint is the color mixed with white, a shade is the color mixed with black. They keep the same hue, so they look like they belong together.
Can I share a color?
Yes. The page address updates with the color, so copying the link shares exactly what you see.
How do I convert RGB to HEX by hand?
Convert each number to two hex digits. For rgb(30, 144, 255), 30 = 1E, 144 = 90 and 255 = FF, so the HEX code is #1E90FF.
What is #FFFFFF in RGB?
White. FF is 255 in each channel, so it is rgb(255, 255, 255). #000000 is black, rgb(0, 0, 0).
Part of the guide: Developer and design tools: QR codes, passwords, JSON, colors and timestamps