Color Code Converter

Enter a color code or pick a color to see its HEX, RGB, HSL, HSV and CMYK values at once, plus its contrast ratio for text.

HEX
-
RGB
-
HSL
-
HSV (HSB)
-
CMYK (approx.)
-

Text contrast (WCAG)

Text on white
-
Text on black
-

Body text needs at least 4.5:1 to meet the WCAG AA readability guideline.

Everything you enter is processed in your browser and is never sent to or stored on a server.

What is a color code converter?

It converts between the color notations used in web design and development: HEX and RGB for CSS, HSL for easy lightness and saturation tweaks, HSV from design apps and CMYK for print. It also shows the contrast ratio against white and black so you can pick accessible text colors.

How to use

  1. Enter a color code or choose a color with the picker. Color names like red work too.
  2. HEX, RGB, HSL, HSV and CMYK values appear instantly.
  3. Press Copy next to the value you need, and check the contrast if you will use it for text.

Frequently asked questions

Can I use the CMYK values for printing?

They are approximations calculated from screen RGB with a simple formula. Real print colors depend on paper and printer color profiles, so check with your printer.

What is an 8-digit HEX code?

In #RRGGBBAA, the last two digits are opacity. For example, #2563EB80 is blue at 50% opacity.

How do I read the contrast ratio?

It measures the difference in brightness between text and background, from 1:1 to 21:1. WCAG AA recommends at least 4.5:1 for normal text and 3:1 for large text.