go-supertools
Developer & Data Tools

Color Converter

Convert colors between HEX, RGB, HSL, HSV, CMYK, OKLab and OKLCH.

Runs in your browser Your input never leaves your device.

HEX
RGB
HSL
HSV
CMYK
OKLab
OKLCH

Accepts HEX (3, 4, 6 or 8 digits), rgb(), hsl(), hsv(), hwb(), cmyk(), oklab(), oklch() and common color names. Values are converted through sRGB, so CMYK is the simple screen formula, not a print profile. Runs in your browser.

Report a problem with this tool

About this tool

Enter a color in whatever format you have and the tool shows it in every other format at once. It reads HEX with 3, 4, 6 or 8 digits, rgb(), hsl(), hsv(), hwb(), cmyk(), oklab(), oklch() (with commas or spaces, percentages and units such as deg or turn) and common color names such as coral or rebeccapurple. The results are HEX, RGB, HSL, HSV, CMYK, OKLab and OKLCH, ready to copy into CSS, with alpha kept when there is any. OKLCH and OKLab are modern perceptual color spaces that CSS now supports: equal steps in lightness look equal, which makes them handy for palettes and accessible contrast. All colors are converted through sRGB, so an OKLCH color outside the sRGB range is clipped to the nearest displayable color and you are told. CMYK here is the simple screen formula, not a print profile, so printed results can differ. Everything runs in your browser.

How to use it

  1. Type a color, pick one with the picker, or use a name.
  2. Read the same color in every format.
  3. Press Copy next to the format you need.
  4. Watch for the note if an OKLCH color had to be clipped to sRGB.

Common problems

My CMYK values do not match my printer
The conversion is the plain mathematical formula for screens. Real print results depend on the paper, ink and color profile.
An oklch() color looks duller than expected
If it is outside the sRGB range it is clipped, and the tool warns you. Lower the chroma (the second number) to stay in range.
A 3-digit code without # is rejected
Without the # it could be confused with a word, so write #f00 for short codes.