Color Converter
Convert colours between HEX, RGB, HSL, HSV, CMYK and OKLCH instantly.
How to use Color Converter
- Pick a colour or type a value in any format (HEX, rgb(), hsl(), oklch() or a name).
- Every format updates instantly.
- Copy the one you need.
How it works
HEX and RGB describe the same thing: amounts of red, green and blue from 0 to 255. HSL (hue, saturation, lightness) and HSV/HSB are easier for people to adjust. OKLCH is a modern CSS colour space whose lightness matches human perception, so palettes built in it look more even. CMYK values here are a simple mathematical conversion; real print colours depend on the printer’s colour profile, so ask your printer for profiled values.
Conversions follow the CSS Color Module Level 4 formulas and Björn Ottosson’s OKLab definition, and round to the nearest whole value for display.
Example
#2440d8 = rgb(36, 64, 216) = hsl(231 71% 49%).
Frequently asked questions
How do I convert HEX to RGB?
Split the six hex digits into three pairs and convert each from base 16: #2440d8 → 24, 40, d8 → 36, 64, 216.
What about transparency (RGBA)?
Type an 8-digit hex (#2440d880) or rgb(… / 0.5); the alpha value is kept in the HEX, RGB and HSL outputs.
Why are my CMYK values different from Photoshop?
Photoshop uses an ICC colour profile for a specific printing process. This tool uses the profile-free formula, which is fine for rough work but not for press-ready files.
Should I use OKLCH in CSS?
All current major browsers support oklch(). It is great for building consistent palettes; keep a hex fallback if you support old browsers.
Limitations
- CMYK is approximate (no ICC profile).
- Colours outside the sRGB gamut (some OKLCH values) are clipped to the nearest displayable colour.
Last reviewed November 9, 2026. How we build and test tools.