Tools / Color Converter / RGB → OKLCH

RGB to OKLCH Converter.

RGB to OKLCH lifts a standard 0-255 color into the perceptual OKLCH space. It's the conversion behind modern, accessible design tokens: store hue and chroma once, then generate a whole tint ramp by stepping lightness — and the steps actually look even.

OKLCH —
All formats

    The RGB → OKLCH formula

    Normalize and linearize RGB, apply the OKLab matrix, take cube roots, then convert the resulting (L, a, b) to polar (L, C, H).

    Worked example

    Convert rgb(154, 42, 42):

    1. Linearize → OKLab
    2. L ≈ 0.43, a ≈ 0.13, b ≈ 0.06
    3. C = √(a²+b²) ≈ 0.14, H = atan2(b,a) ≈ 26°
    4. Result: oklch(43% 0.14 26)

    JavaScript

    // see rgbToOklch in colorConvert.ts (Ottosson OKLab matrices)
    rgbToOklch({r:154,g:42,b:42}); // {l:0.43, c:0.14, h:26}

    FAQ

    What's a typical chroma value?

    OKLCH chroma usually runs 0 (grey) to about 0.37 (most vivid sRGB). Muted, editorial palettes sit around 0.02-0.08; brand accents around 0.1-0.2.

    Paid links below. As an Amazon Associate we earn from qualifying purchases.

    Library

    Colour references for your next project

    Compare the original references behind this archive. Check the contents, edition and format before choosing a book.

    Book links are Amazon Associates affiliate links. Your price is unchanged; a small commission supports the archive. As an Amazon Associate we earn from qualifying purchases.

    Torn between the two Wada dictionaries? Vol 1 vs Vol 2, compared plate by plate →

    Book links are Amazon Associates affiliate links. Your price is unchanged; a small commission supports the archive. As an Amazon Associate we earn from qualifying purchases.

    Looking for a combination we don’t have yet?

    Tell us the colour, mood, or palette you were after — it shapes which editorial combinations we add next.