Color Converter

Convert any colour between HEX, RGB, HSL, HSV, HWB, CMYK, Lab and OKLCH. Shows the nearest CSS colour name and contrast on white and black.

Runs in your browserNo sign-upWorks offline
Your result—
Formula used
Shown here after you calculate
Rounded to
2 decimal places

What the Color Converter does

The Color Converter reads a colour written in any CSS format and shows it in all the others at once: HEX, RGB, HSL, HSV, HWB, CMYK, Lab and OKLCH. It understands the 148 CSS colour names, transparency in every format, and the modern lab(), lch(), oklab() and oklch() functions. It also names the closest CSS colour and shows the contrast ratio of the colour on white and on black.

How to use it

  1. Type or paste a colour in any format, or use the colour picker.
  2. Move the Opacity slider to add transparency.
  3. Copy the format you need with its Copy button.

Example

#0EA5E9 converts to rgb(14, 165, 233), hsl(199, 89%, 48%), hwb(199 5% 9%), cmyk(94%, 29%, 0%, 9%), lab(63.35% -17.61 -44.86) and oklch(68.47% 0.1479 237.32); the closest CSS name is cornflowerblue. Typing oklch(70% 0.15 30) gives #ED7665, a coral close to lightcoral. Each result was checked against what Chrome itself draws for the same colour.

Which format to use

HEX and RGB are the most widely supported. HSL is handy for making lighter and darker versions by changing one number. OKLCH, supported by every current browser, is the best choice for design systems: its lightness matches what people see, and its chroma can reach the richer colours of modern P3 screens.

CMYK here is a simple conversion without a printer profile, good as a starting point. For print work, ask your printer for the values that match their press.

Questions people ask

Is anything uploaded?

No. Everything is worked out in your browser, so your colours, designs and images stay on your device.

What happens to a colour too strong for sRGB?

Its chroma is reduced until it fits, the same way CSS shows it on a normal screen, and the result is shown in every format.

Why does an HSL round-trip change a colour slightly?

HSL is shown in whole numbers, so converting back can be off by one or two steps in a channel.

Can I enter 8-digit HEX?

Yes. #0EA5E980 means the same colour at 50% opacity.

Related tools