Color Picker and Converter

Pick a color or paste any color code to see it in every common format, ready to copy, with an accessibility contrast check.

Sample textSample text

—Contrast with white text
—Contrast with black text

Color codes explained

Screens build every color from red, green and blue light. In RGB each channel goes from 0 to 255, so rgb(255, 0, 0) is pure red and rgb(255, 255, 255) is white. A HEX code writes the same three numbers in hexadecimal: #FF0000 is red, #FFFFFF white and #000000 black. A three-digit code like #F80 is shorthand for #FF8800.

HSL describes a color the way people think about it: hue is the position on the color wheel in degrees (0 red, 120 green, 240 blue), saturation is how vivid it is, and lightness how close it is to white or black. That makes it easy to create a lighter or darker shade by changing only the lightness. HSV (or HSB) is similar but uses brightness instead of lightness and is common in design apps.

CMYK is used for printing: cyan, magenta, yellow and black ink percentages. Converting from RGB is only an approximation, because printers cannot reproduce some bright screen colors, especially vivid blues and greens. Professional printing uses color profiles to manage the difference.

Contrast decides whether text is readable. The WCAG ratio compares the relative brightness of two colors, from 1:1 (identical) to 21:1 (black on white). For normal-sized text aim for at least 4.5:1; the grey #767676 on white, at about 4.54:1, is the lightest grey that passes. The preview on this page shows white and black sample text on your color.

How to use it

  1. Pick a color with the selector, or type a code such as #4f46e5, rgb(79, 70, 229) or hsl(243, 75%, 59%).
  2. Copy the format you need: HEX, RGB, HSL, HSV or CMYK.
  3. Check the contrast ratios to see whether white or black text is readable on that color.

Frequently asked questions

How do I convert HEX to RGB?

Split the six-digit code into three pairs and convert each from hexadecimal to decimal. #FF8800 becomes FF = 255, 88 = 136 and 00 = 0, so rgb(255, 136, 0).

What is a good contrast ratio?

The WCAG accessibility guidelines ask for at least 4.5:1 for normal text and 3:1 for large text (level AA), and 7:1 for normal text at the stricter AAA level.

Why does the printed color look different?

Screens mix light (RGB) and printers mix ink (CMYK), and they cannot reproduce exactly the same range of colors. The CMYK values here are a simple mathematical conversion; for professional printing, use the color profile your printer recommends.

More free tools