ruxox
Start
Start
Design / Color

Colour Converter

Convert colours between HEX, RGB, HSL, and oklch instantly in your browser. See colour preview and all format representations side by side.

Colour Converter

Runs entirely in your browser — no server calls, no tracking.

Enter a colour and click Convert.

🔒 Your data never leaves this tab. This tool has no backend.

About this tool

About the Colour Converter

Different CSS colour formats are suited to different workflows. HEX is compact and universal — most design tools export it. RGB gives direct control over red, green, and blue channels, useful for colour mixing in code. HSL (Hue, Saturation, Lightness) maps to how humans perceive colour — easier to adjust brightness or desaturate a colour without trial and error. oklch is the modern perceptually-uniform colour space used in the ruxox design system and in CSS Color Level 4.

Why oklch?

HSL is not perceptually uniform — a green and a blue with the same lightness value look different to human vision. oklch (OKLab Chroma and Hue) corrects this: colours at the same L value actually look the same brightness. This makes it ideal for generating colour palettes programmatically — you can adjust chroma or hue without accidentally changing perceived lightness. The ruxox design system uses oklch tokens throughout for this reason.

Color space support in browsers

All modern browsers (Chrome, Safari, Firefox, Edge) support oklch and the full CSS Color Level 4 syntax. oklch(60% 0.15 180) is a valid CSS value. For older browser support, use @supports (color: oklch(0% 0 0)) to check, or provide an HSL fallback. P3 colour gamut (wider than sRGB) is supported on Safari/iOS and Chrome on supported displays — oklch colours with high chroma may exceed the sRGB gamut and appear differently on non-P3 screens.

FAQ

Frequently asked questions

What is the difference between HSL and oklch?
Both define colours using hue (the colour direction), a saturation/chroma value (intensity), and a lightness value. HSL is simple but not perceptually uniform — a green and a blue at L=50% look very different in brightness. oklch uses the perceptually-uniform OKLab model, so colours at the same L value actually look equally bright to human eyes. Use HSL for quick adjustments; use oklch for building systematic design tokens.
What does the "ok" prefix in oklch mean?
ok stands for "OK" as in Björn Ottosson's 2020 improvement of the CIELAB/LCH colour space. He published a blog post titled "A perceptual color space for image processing" describing the OKLab model. oklch is the cylindrical (polar) representation of OKLab, equivalent to how LCH is the cylindrical form of Lab.
Why do some oklch values produce colours outside the sRGB gamut?
oklch describes all physically perceivable colours, not just the sRGB subset. High chroma values at some hues go beyond what an sRGB display can show. CSS clamps them to the nearest in-gamut colour, but P3-capable displays (most Apple screens since 2016, newer Android flagships) can render the full value. Use the @media (color-gamut: p3) query to target P3 screens specifically.
Can I use oklch in production CSS today?
Yes — oklch is supported in all modern browsers without a prefix. Can I Use shows ~90%+ global support as of 2026. For the small percentage of older browsers that do not support it, provide an HSL or HEX fallback before the oklch rule — browsers ignore properties they do not understand, so the fallback stands.
Custom software

Need a custom design system or frontend built?

ruxox builds production-grade web products with systematic design tokens, oklch color systems, and consistent UI.