HEX to OKLCH: #556B2F

Also known as: CSS darkolivegreen

Result

#556B2F → oklch(0.496 0.090 126.2)

Values are shown at full precision, so converting back gives exactly #556b2f. 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. sRGB → linear

    R: 85/255 = 0.33333 → 0.090842  (((x + 0.055) / 1.055)^2.4)
    G: 107/255 = 0.41961 → 0.147027  (((x + 0.055) / 1.055)^2.4)
    B: 47/255 = 0.18431 → 0.028426  (((x + 0.055) / 1.055)^2.4)
  2. 2. linear sRGB → LMS

    l = 0.4122·R + 0.5363·G + 0.0514·B = 0.117765
    m = 0.2119·R + 0.6807·G + 0.1074·B = 0.122384
    s = 0.0883·R + 0.2817·G + 0.6300·B = 0.067350
  3. 3. cube root

    l′ = ∛0.117765 = 0.490161
    m′ = ∛0.122384 = 0.496487
    s′ = ∛0.067350 = 0.406860
  4. 4. LMS′ → Oklab

    L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.49552
    a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = -0.05290
    b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = 0.07232
  5. 5. Oklab → OKLCH

    C = √(a² + b²) = 0.08960
    H = atan2(b, a) = 126.186°
    L = 0.49552
  6. 6. OKLCH

    oklch(0.49552 0.08960 126.186)
    rounded: oklch(0.496 0.090 126.2)

All formats

HEX
#556b2f
RGB
rgb(85 107 47)
RGB (legacy)
rgb(85, 107, 47)
HSL
hsl(82.00 38.96% 30.20%) → hsl(82 39% 30%)
HWB
hwb(82 18% 58%)
OKLCH
oklch(0.496 0.090 126.2) · oklch(49.6% 0.090 126.2)
OKLab
oklab(0.496 -0.053 0.072)
Lab (D50)
lab(42.36 -16.40 30.32)
LCH (D50)
lch(42.36 34.47 118.41)
Display P3
color(display-p3 0.3506 0.4171 0.2153)
Linear sRGB
color(srgb-linear 0.0908 0.1470 0.0284)

Gamut: sRGB and Display P3

#556B2F is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.126 and Display P3 reaches 0.148; this color uses 71% of the sRGB chroma available.

CSS snippets

.element {
  color: #556b2f;
  color: rgb(85 107 47);
  color: hsl(82 39% 30%);
  color: oklch(0.496 0.090 126.2);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.496 0.090 126.2);
}
/* arbitrary values */
class="text-[#556b2f] bg-[oklch(0.496_0.090_126.2)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.3506 0.4171 0.2153); }
}

/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #556b2f 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

  • #667D40 · oklch(0.556 0.090 126.2) · ΔL +0.06
  • #455A1D · oklch(0.436 0.090 126.2) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?