Color converter

Type or paste a color in any common notation, or use the picker. All six formats update at once, ready to copy into CSS, design tools or print software.

Examples: #3366cc, rgb(51 102 204), hsl(220, 60%, 50%), hsv(220, 75%, 80%), cmyk(75%, 50%, 0%, 20%), oklch(55% 0.17 262)
  • HEX#3366cc
  • RGBrgb(51, 102, 204)
  • HSLhsl(220, 60%, 50%)
  • HSVhsv(220, 75%, 80%)
  • CMYKcmyk(75%, 50%, 0%, 20%)
  • OKLCHoklch(53.2% 0.168 262.3)

Runs in your browser: nothing you enter is sent anywhere.

How to use it

  1. Enter a colour in the text box, or choose one with the colour picker.
  2. Read the six formats below. Each has its own Copy button.

Accepted input: #rgb, #rrggbb, rgb(), hsl(), hsv(), cmyk() and oklch(), with commas or spaces between values, and optional % and deg units.

How the conversions work

  • HSL and HSV are rearrangements of RGB into hue (the angle on the colour wheel), saturation and lightness or value.
  • CMYK here is K = 1 − max(R, G, B) and the other channels are scaled by what is left.
  • OKLCH converts sRGB to linear light, then to the Oklab space, and then to polar form (lightness, chroma, hue).

Example

#3366cc is rgb(51, 102, 204), hsl(220, 60%, 50%), hsv(220, 75%, 80%) and cmyk(75%, 50%, 0%, 20%). Pure red #ff0000 is oklch(62.8% 0.258 29.2).

Tips

  • Grey colours have no meaningful hue; it is shown as 0.
  • Alpha (transparency) is not handled; enter the opaque colour.

Frequently asked questions

Is the conversion exact?

HEX and RGB are exact integers. HSL, HSV and CMYK are shown rounded to whole percents and degrees, and OKLCH to one decimal for lightness and hue and three for chroma, so converting back can differ by a point or two in a channel.

Is CMYK here the same as in my printer?

No. This is the simple mathematical conversion from RGB, with no colour profile. Real print results depend on the inks, paper and the ICC profile, so use it as a starting point, not as a proof.

What is OKLCH?

OKLCH expresses a colour as lightness, chroma (colourfulness) and hue, built on the Oklab space, which is designed so equal numeric steps look more equal to the eye. CSS supports it as oklch(L C h).

Which RGB space is used?

Standard sRGB, the default for web colours. Colours outside sRGB, which OKLCH can describe, are clipped to the nearest value sRGB can show.

More in Color

All tools in this category: Color ·Updated November 3, 2026

Privacy choices

Google Analytics shows us which tools are used and whether they work. It may set cookies. Your choice is kept in this browser.