CompleteSEOTools
Home › Unit Converters › Color Converter

Color converter

Type a colour in any common format and get it back in all the others, ready to paste into CSS.

About Color Converter

Colours show up in many formats and each tool wants a different one. Type a hex code, an rgb() or hsl() value, a CSS name such as tomato, or pick one with the colour picker. The page shows the same colour as HEX, RGB, HSL, HSV, CMYK and OKLCH, names the closest CSS colour, and tells you how well black and white text read on it. Everything is worked out in your browser and nothing is sent anywhere.

  • Turning a hex code from a brand guide into an hsl() value you can tweak.
  • Getting an OKLCH value for modern CSS from an old hex colour.
  • Checking whether white or black text is readable on a background.
  • Finding the nearest CSS colour name for a shade.

How to use Color Converter

1

Step 1

Type or paste a colour, or use the colour picker.

2

Step 2

Read the same colour in every format and copy the one you need.

3

Step 3

Check the contrast boxes before you put text on that colour.

Good to know

  • CMYK here is the simple screen formula, not a print profile. A printer's real inks will give a different result, so ask your printer for its own values.
  • Transparency is not handled. Hex codes with 4 or 8 digits and values with an alpha below 1 are refused rather than quietly changed.
  • OKLCH colours can sit outside what a screen can show. If you type one, the page moves it to the nearest displayable colour and says so.

Common questions

What is the difference between HSL and HSV?

Both describe a colour by hue, saturation and a brightness value. In HSL the lightest point is white, at 100% lightness. In HSV, 100% value is the full-strength colour and white needs zero saturation.

Which contrast ratio is enough for text?

WCAG asks for at least 4.5 to 1 for normal text and 3 to 1 for large text at level AA. Level AAA asks for 7 to 1 and 4.5 to 1.

Why does my hex code give a slightly different RGB value elsewhere?

It should not for hex, RGB and the CSS names, which convert exactly. HSL, HSV, CMYK and OKLCH are shown rounded, so converting a rounded value back can be off by one step.