Local-first, alwaysA little guidance ↗

SAME COLOR. DIFFERENT LANGUAGE.

OKLCH to HEX
color converter.

Convert OKLCH, HEX, RGB and HSL with copyable results. See when an out-of-gamut OKLCH color needs chroma reduction to fit 8-bit sRGB.

SPEAK COLOR, FLUENTLY

HEX · rgb(141 121 223) · hsl(252 61% 67%) · oklch(65% 0.15 290)

Opaque colors only. Values are normalized to 8-bit sRGB; display values are rounded.

Aa#8D79DF

FROM A COLOR TO A CLEAR DECISION

Convert color formats and understand what changed

Convert opaque OKLCH, HEX, RGB and HSL input into normalized 8-bit sRGB output. Palunio shows all four representations and explicitly reports when an OKLCH input needs gamut mapping.

How to use this tool

  1. Enter HEX, rgb(), hsl() or oklch() using the supported syntax. Alpha values, CSS names and color(display-p3 …) are outside this tool’s current scope.
  2. Select Convert color and inspect the result. A mapping notice means the requested OKLCH color did not fit sRGB unchanged.
  3. Copy the required representation, or use the result as your palette’s primary color. Displayed decimal coordinates are rounded.

Why an OKLCH color can change when converted to HEX

OKLCH can describe colors beyond sRGB, while six-digit HEX represents a bounded 8-bit sRGB color. A format conversion cannot preserve an out-of-gamut color exactly. Palunio reduces chroma at constant requested lightness and hue before rounding to HEX.

Inspect a deliberately out-of-gamut orange

oklch(70% 0.4 30) maps to #FF6551 in this tool. The requested chroma is reduced; converting the HEX back to OKLCH yields oklch(69.99% 0.1916 30.03), with small rounding differences.

Inspect the mapped example →

This is a strict sRGB-boundary method, not the CSS local-MINDE algorithm. Different gamut-mapping strategies can produce different fallbacks without either pretending the original wide-gamut color fits sRGB.

Method reference: CSS Color 4: OKLCH and gamut mapping. Read all calculation methods and limitations.

Common questions

Does HEX preserve every OKLCH color?

No. Six-digit HEX stores 8-bit sRGB. Out-of-gamut OKLCH colors need mapping, and even in-gamut colors can change slightly because of quantization.

Which input formats are accepted?

Three- or six-digit HEX, opaque rgb() with numeric or percentage channels, hsl() with percentage saturation/lightness, and oklch() with numeric chroma and hue. CSS color names, alpha and CMYK are not accepted.

Why do the converted decimals differ from my input?

The tool stores the mapped 8-bit sRGB result. Converting it back introduces quantization differences; displayed decimal places are also rounded.