Color Converter

Converts any colour you enter into HEX, RGB, HSL, HSV, CMYK and OKLCH, and names the nearest CSS colour. Enter one colour per line in almost any common format.

Use the tool

Why this tool exists

Design files give you hex, CSS wants hsl or oklch, a print brief asks for CMYK, and a colleague sends "tomato". Converting between them by hand means maths you would rather not do, and online converters tend to handle one pair of formats at a time.

Type or paste several colours, one per line, in HEX, RGB, HSL, OKLCH or by CSS name. For each, you get every other format together, with alpha kept where you gave it, plus the CSS name if it matches exactly or the nearest one if not. CMYK here is a simple mathematical conversion from RGB, not a colour-managed print profile, so expect shifts in real printing. All calculation is local to your browser.

How to use it

  1. Enter one colour per line, in any format such as #ff0000, rgb(...), hsl(...), oklch(...) or a name.
  2. Read the converted values for each line in the output.
  3. Copy the format you need.
  4. Add more lines to convert several colours at once.

Frequently asked questions

Which input formats are accepted?

Hex with 3, 4, 6 or 8 digits, rgb and hsl with commas or spaces, oklch, and CSS colour names. Each line is parsed separately, and an unreadable line produces an error message.

Is the CMYK value usable for print?

Only as a rough guide. It is a direct maths conversion from RGB with no ICC profile, so it ignores inks, paper and gamut. Ask your printer for profile-based conversion when colour accuracy matters.

What does the Name line mean?

If the colour exactly matches a CSS named colour it shows that name. Otherwise it shows "nearest:" followed by the closest named colour, judged in a perceptual colour space.

Why does OKLCH look unfamiliar?

OKLCH describes colour by lightness, chroma and hue in a perceptually even space, and is supported in modern CSS. Equal steps in lightness look equal to the eye, unlike HSL.