Conversion · 52 tools

Color Converters

HEX, RGB, HSL, HSB, CMYK, Lab, LCH, OKLab and OKLCH — every pairing, with the working shown.

A color notation is a coordinate system, and converting between two of them is not a lookup — it is a chain of transforms with a specific order. HEX to OKLCH, for instance, means scaling to 0–1, undoing the sRGB transfer function, multiplying into LMS cone space, taking a cube root, applying the OKLab matrix, and finally converting the opponent axes to polar form. Every converter here shows those steps rather than printing an answer, because the steps are what tell you why the answer is what it is.

The one conversion that is genuinely approximate is CMYK. It describes ink on a substrate, and without an ICC profile for a specific press and a specific stock, any RGB to CMYK conversion is a naive formula standing in for a measured characterisation. Fine for a mockup, wrong for a print order — and any tool that implies otherwise is lying to you.

Which notation to reach for depends on what you are about to do. HEX for handing a value to someone. RGB when compositing. HSL only when you already have a designer's palette expressed in it. OKLCH for anything generated: ramps, hover states, accessible pairs, gradients — anywhere equal numeric steps need to look like equal steps.

All 52 conversion tools

Conversion

Universal Color Converter

Every notation the web understands, at once.

Conversion

OKLCH Explorer

The color space CSS finally gave us. Learn it here.

Conversion

Color Name Finder

What do I even call this?

Conversion

Color Temperature Converter

Kelvin to RGB, warm to cool.

Conversion

HEX to RGB Converter

HEX color code in, RGB out — with the working shown.

Conversion

HEX to HSL Converter

HEX color code in, HSL out — with the working shown.

Conversion

HEX to HSB Converter

HEX color code in, HSB (HSV) out — with the working shown.

Conversion

HEX to CMYK Converter

HEX color code in, CMYK out — with the working shown.

Conversion

HEX to OKLCH Converter

HEX color code in, OKLCH out — with the working shown.

Conversion

RGB to HEX Converter

RGB in, HEX color code out — with the working shown.

Conversion

RGB to HSL Converter

RGB in, HSL out — with the working shown.

Conversion

RGB to HSB Converter

RGB in, HSB (HSV) out — with the working shown.

Conversion

RGB to CMYK Converter

RGB in, CMYK out — with the working shown.

Conversion

RGB to OKLCH Converter

RGB in, OKLCH out — with the working shown.

Conversion

HSL to HEX Converter

HSL in, HEX color code out — with the working shown.

Conversion

HSL to RGB Converter

HSL in, RGB out — with the working shown.

Conversion

HSL to HSB Converter

HSL in, HSB (HSV) out — with the working shown.

Conversion

HSL to CMYK Converter

HSL in, CMYK out — with the working shown.

Conversion

HSL to OKLCH Converter

HSL in, OKLCH out — with the working shown.

Conversion

HSB to HEX Converter

HSB (HSV) in, HEX color code out — with the working shown.

Conversion

HSB to RGB Converter

HSB (HSV) in, RGB out — with the working shown.

Conversion

HSB to HSL Converter

HSB (HSV) in, HSL out — with the working shown.

Conversion

HSB to CMYK Converter

HSB (HSV) in, CMYK out — with the working shown.

Conversion

HSB to OKLCH Converter

HSB (HSV) in, OKLCH out — with the working shown.

Conversion

CMYK to HEX Converter

CMYK in, HEX color code out — with the working shown.

Conversion

CMYK to RGB Converter

CMYK in, RGB out — with the working shown.

Conversion

CMYK to HSL Converter

CMYK in, HSL out — with the working shown.

Conversion

CMYK to HSB Converter

CMYK in, HSB (HSV) out — with the working shown.

Conversion

CMYK to OKLCH Converter

CMYK in, OKLCH out — with the working shown.

Conversion

OKLCH to HEX Converter

OKLCH in, HEX color code out — with the working shown.

Conversion

OKLCH to RGB Converter

OKLCH in, RGB out — with the working shown.

Conversion

OKLCH to HSL Converter

OKLCH in, HSL out — with the working shown.

Conversion

OKLCH to HSB Converter

OKLCH in, HSB (HSV) out — with the working shown.

Conversion

OKLCH to CMYK Converter

OKLCH in, CMYK out — with the working shown.

Conversion

HEX to Lab Converter

HEX color code in, CIE Lab out — with the working shown.

Conversion

Lab to HEX Converter

CIE Lab in, HEX color code out — with the working shown.

Conversion

RGB to Lab Converter

RGB in, CIE Lab out — with the working shown.

Conversion

Lab to RGB Converter

CIE Lab in, RGB out — with the working shown.

Conversion

HEX to LCH Converter

HEX color code in, LCH out — with the working shown.

Conversion

LCH to HEX Converter

LCH in, HEX color code out — with the working shown.

Conversion

RGB to LCH Converter

RGB in, LCH out — with the working shown.

Conversion

LCH to RGB Converter

LCH in, RGB out — with the working shown.

Conversion

HEX to OKLab Converter

HEX color code in, OKLab out — with the working shown.

Conversion

OKLab to HEX Converter

OKLab in, HEX color code out — with the working shown.

Conversion

RGB to OKLab Converter

RGB in, OKLab out — with the working shown.

Conversion

OKLab to RGB Converter

OKLab in, RGB out — with the working shown.

Conversion

Lighten a Color

Make a color lighter without wrecking its hue.

Conversion

Darken a Color

Make a color darker without clipping it into a different hue.

Conversion

Saturate a Color

Add chroma, and find out where the display stops you.

Conversion

Desaturate a Color

Pull chroma out without moving lightness.

Conversion

Invert a Color

The RGB inversion and the lightness inversion are not the same thing.

Conversion

Grayscale a Color

The correct luminance-weighted conversion, next to the common wrong one.

Further reading

Frequently asked questions

How do I convert HEX to RGB?

Split the six digits into three pairs and read each as a base-16 number. #2f81f7 becomes 2f = 47, 81 = 129, f7 = 247, so rgb(47 129 247). Three-digit hex expands by doubling each digit: #2af is #22aaff.

Is HSL or OKLCH better for generating color ramps?

OKLCH, and not by a small margin. HSL lightness is a simple average of the largest and smallest RGB channels, which has almost no relationship to perceived brightness — a ramp built by stepping HSL lightness bunches up at the dark end and produces steps that look uneven across hues. OKLCH lightness is perceptual, so equal steps look equal, and the same ramp function works for yellow and blue alike.

Why does my RGB to CMYK conversion not match my printer?

Because a correct conversion needs an ICC profile describing the specific press, ink set and paper, and a formula-based converter does not have one. The naive conversion is useful for approximating how a color will shift and for spotting values that are obviously out of reach in print. It is not a proof, and it should never be the file you send.

What is the difference between Lab and OKLab?

Both are perceptual, device-independent, opponent-axis spaces, and both are far more uniform than sRGB. OKLab is the 2020 revision, fitted to better data: its main practical advantage is hue uniformity, so interpolating between two colors does not swing through purple the way Lab can in the blue region.

Other categories