How to convert a color
- 1Type or paste a color into the input. The format is detected automatically and invalid input is flagged right away.
- 2Read the conversions on the right. Each value has its own copy button.
- 3For many colors at once, choose Batch conversion, paste one color per line, pick the target format and copy the results or download them as CSV.
Supported conversions
| From | To | Notes |
|---|---|---|
| HEX | RGB, HSL, HSV, CMYK, OKLCH | 3, 4, 6 and 8-digit HEX (with alpha) are accepted, with or without #. |
| RGB / RGBA | HEX, HSL, HSV, CMYK, OKLCH | Comma or space syntax, numbers or percentages: rgb(37 150 190 / 50%). |
| HSL / HSV | HEX, RGB, CMYK, OKLCH | Hue may use deg, rad, grad or turn units. |
| CMYK | HEX, RGB | Uses the standard device-independent formula. |
| OKLCH | HEX, RGB, HSL | Out-of-gamut colors are mapped into sRGB by reducing chroma. |
How the conversions work
HEX is simply RGB written in base 16: #2596BE means red 0x25 (37), green 0x96 (150), blue 0xBE (190). HSL and HSV are geometric rearrangements of RGB, so converting between them is exact apart from rounding.
CMYK conversion uses the common formula K = 1 − max(R, G, B), then C = (1 − R − K) / (1 − K), and so on. Real print output depends on paper and ink profiles, so treat these values as a starting point rather than a press-ready specification.
OKLCH is based on the OKLab color space by Björn Ottosson, now part of CSS Color Level 4. It is perceptually uniform, so equal steps in lightness look equal to the eye. Some OKLCH colors can't be shown on standard screens; the converter reduces chroma while keeping lightness and hue until the color fits the sRGB gamut, and tells you when it did.
Frequently asked questions
How do I convert HEX to RGB?
Split the six digits into three pairs and convert each from hexadecimal to decimal: #2596BE → 25, 96, BE → 37, 150, 190. Or paste the HEX code above to get the RGB value instantly.
Is RGB to CMYK conversion accurate for printing?
It's mathematically correct, but printers use color profiles (such as FOGRA or GRACoL) that change the final values. For professional print work, convert in your design software with the profile your printer provides.
What is OKLCH and why use it?
OKLCH describes colors by lightness, chroma and hue in a way that matches human perception much better than HSL. It's supported in all modern browsers and is great for generating consistent color scales.
Can I convert many colors at once?
Yes. Use *Batch conversion*: paste up to 500 colors, one per line, in any mix of formats.