HEX to RGB Colour Converter
Enter a HEX code or pick a colour — get RGB, RGBA, HSL, HSV, CMYK, OKLCH and CSS variable values instantly. Click any result to copy it.
Going From Design File to Code
Design tools like Figma and Adobe XD show colour in HEX. CSS accepts HEX, RGB, HSL, OKLCH and named colours. Print requires CMYK. This tool converts any HEX code into all formats simultaneously — paste your colour from the design handoff and copy whatever format your next step needs.
Colour Formats Explained
- RGB — Three values 0–255 for Red, Green, Blue. The standard screen colour model.
- RGBA — Same as RGB with an alpha channel (0–1) for transparency.
- HSL — Hue (0–360°), Saturation (0–100%), Lightness (0–100%). Used in CSS. Lightness 100% is always white.
- HSV / HSB — Hue, Saturation, Value (Brightness). Used in Photoshop, Figma and design tools. Value 100% is fully saturated colour, not white.
- OKLCH — A perceptually uniform colour space supported in modern CSS. L is lightness (0–1), C is chroma (colourfulness), H is hue angle (0–360°). More consistent across different hues than HSL, and the basis for CSS colour-mix().
- CMYK — Cyan, Magenta, Yellow, Black percentages. Used in print design.
- RGB (0–1) — Fractional RGB for WebGL shaders and graphics programming.
Why OKLCH Matters
HSL has a known problem: colours at the same lightness value look very different in perceived brightness — a yellow at HSL 50% lightness looks far brighter than a blue at HSL 50%. OKLCH is a perceptually uniform space where equal steps in lightness actually look equal to the human eye. CSS now supports oklch() natively in all modern browsers (Chrome 111+, Firefox 113+, Safari 15.4+), making it the recommended format for modern CSS colour design systems.
HSL vs HSV — Which One Do You Need?
CSS uses HSL — white is 100% lightness. Design tools like Photoshop, Figma and Sketch use HSV — a fully saturated, maximum-value colour is pure and vivid. If your design tool shows "H: 195, S: 100, B: 100" that is HSV. If your CSS colour picker shows "H: 195, S: 100%, L: 50%" that is HSL.