ToolsMaxxing

Color converter

Translate a colour between HEX, RGB, HSL, HSV and CMYK, and check its text contrast.

HEX
#4f46e5
RGB
rgb(79, 70, 229)
HSL
hsl(243, 75%, 59%)
HSV
hsv(243, 69%, 90%)
CMYK
cmyk(66%, 69%, 0%, 10%)

Text contrast (WCAG)

White text on this colour
6.29:1 Passes AA
Black text on this colour
3.34:1 Large text only

Your files stay on your device

How it works

  1. 1Type a colour in any format, or choose one with the colour picker.
  2. 2Read the same colour in every format.
  3. 3Copy the one you need.
  4. 4Check the contrast lines to see if text on it is readable.

What the options do

Accepted input
#rgb, #rrggbb, #rrggbbaa, rgb(), hsl() and CSS colour names such as tomato.
Contrast
The WCAG ratio against white and black. 4.5:1 is the AA level for normal text.

Privacy

Everything is calculated in your browser. Nothing you enter is sent to a server.

Questions people ask

Which format should I use on a website?

Any works in CSS. HEX is the most common and short. HSL is easier to adjust by hand, since lightness and saturation are separate.

Can I use the CMYK value for printing?

Only as a rough guide. Print shops convert with colour profiles, and bright screen colours often print duller.

What is the number in an eight-digit hex?

The last two digits set opacity from 00 (clear) to ff (solid).

Why was my colour not recognised?

Use a valid HEX code, rgb() or hsl() form, or a CSS colour name. Names from other tools are not CSS names.

Is this the same tool as the one in Developer tools?

Yes, the same converter. It is listed in both places so you can find it from either.

Related tools