Color converter and color picker

Pick a color or type a code in any format, and get it in HEX, RGB, HSL, HSV and CMYK at once. Lighter and darker shades and contrast scores are shown too.

Shades (click to use)

—
Contrast with white text
—
Contrast with black text

How to use the color converter & picker

  1. Click Pick a Color, or type a color code into any of the boxes.
  2. All the other formats update as you type.
  3. Click Copy next to the format you need.

Color formats explained

FormatExampleWhere it is used
HEX#2563EBHTML and CSS, design tools
RGBrgb(37, 99, 235)Screens, CSS, image editors
HSLhsl(221, 83%, 53%)CSS, when you want to adjust lightness or saturation
HSV / HSBhsv(221, 84%, 92%)Color pickers in Photoshop, Figma and similar apps
CMYKcmyk(84%, 58%, 0%, 8%)Printing

How HEX and RGB relate

A HEX code is just RGB written in hexadecimal. The six characters are three pairs: red, green and blue, each from 00 (none) to FF (full, which is 255). So #FF8000 is red 255, green 128, blue 0. A three-character code such as #F80 is shorthand for #FF8800.

What the contrast scores mean

The contrast ratio shows how readable text is on this color. The accessibility guidelines (WCAG) ask for at least 4.5 : 1 for normal text (level AA) and 7 : 1 for the strictest level (AAA). Large headings need 3 : 1. Use whichever of black or white text scores higher.

A note on CMYK

Screens mix light and printers mix ink, so the same numbers can look different on paper. The CMYK values here are a standard mathematical conversion and a good starting point. For exact print colors, your printer's color profile has the final say.

Want the colors from a photo? Try the color palette generator.

Frequently asked questions

How do I convert HEX to RGB?

Type the HEX code into the HEX box. The RGB value appears in the RGB box.

How do I convert RGB to HEX?

Type the three numbers into the RGB box, for example 37, 99, 235. The HEX code updates straight away.

Can I type a color name?

Yes. Names that browsers know, such as tomato or navy, work in any box.

How do I find a lighter or darker version of a color?

Click one of the shades under the color. It keeps the same hue and changes only the lightness.