OKLCH to HEX: #052E16

Also known as: Tailwind v3 green-950

Result

oklch(0.26636 0.06285 152.934) → #052E16

Values are shown at full precision, so converting back gives exactly #052e16. The rounded form is what you normally paste into CSS.

Step-by-step math

Every number below is computed from the input, nothing is looked up.

  1. 1. input

    oklch(0.26636 0.06285 152.934)
  2. 2. OKLCH → Oklab

    a = C·cos H = -0.05597
    b = C·sin H = 0.02860
  3. 3. Oklab → LMS′

    l′ = L + 0.3963·a + 0.2158·b = 0.250350
    m′ = L − 0.1056·a − 0.0639·b = 0.270442
    s′ = L − 0.0895·a − 1.2915·b = 0.234435
  4. 4. cube

    l = 0.250350³ = 0.015691
    m = 0.270442³ = 0.019780
    s = 0.234435³ = 0.012884
  5. 5. LMS → linear sRGB

    R = 4.0767·l − 3.3077·m + 0.2310·s = 0.001517
    G = −1.2684·l + 2.6098·m − 0.3413·s = 0.027320
    B = −0.0042·l − 0.7034·m + 1.7076·s = 0.008022
  6. 6. linear → sRGB, × 255

    R = 0.01960 × 255 = 5.00 → 5
    G = 0.18039 × 255 = 46.00 → 46
    B = 0.08627 × 255 = 22.00 → 22
  7. 7. RGB → HEX

    #052E16

All formats

HEX
#052e16
RGB
rgb(5 46 22)
RGB (legacy)
rgb(5, 46, 22)
HSL
hsl(144.88 80.39% 10.00%) → hsl(145 80% 10%)
HWB
hwb(145 2% 82%)
OKLCH
oklch(0.266 0.063 152.9) · oklch(26.6% 0.063 152.9)
OKLab
oklab(0.266 -0.056 0.029)
Lab (D50)
lab(15.70 -19.71 11.31)
LCH (D50)
lch(15.70 22.73 150.17)
Display P3
color(display-p3 0.0710 0.1773 0.0953)
Linear sRGB
color(srgb-linear 0.0015 0.0273 0.0080)

Gamut: sRGB and Display P3

#052E16 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.069 and Display P3 reaches 0.095; this color uses 92% of the sRGB chroma available.

CSS snippets

.element {
  color: #052e16;
  color: rgb(5 46 22);
  color: hsl(145 80% 10%);
  color: oklch(0.266 0.063 152.9);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.266 0.063 152.9);
}
/* arbitrary values */
class="text-[#052e16] bg-[oklch(0.266_0.063_152.9)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.0710 0.1773 0.0953); }
}

/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #052e16 calc(l - 0.1) c h); }

Nearby colors

Closest colors in the Tailwind and CSS named palettes (OKLab distance).

Lighter and darker, same hue and chroma

  • #173E25 · oklch(0.326 0.063 152.9) · ΔL +0.06
  • #001F08 · oklch(0.206 0.063 152.9) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?