OKLCH to HEX: #2B2B22

Also known as: Tailwind olive-800

Result

oklch(0.28601 0.01583 107.360) → #2B2B22

Values are shown at full precision, so converting back gives exactly #2b2b22. 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.28601 0.01583 107.360)
  2. 2. OKLCH → Oklab

    a = C·cos H = -0.00472
    b = C·sin H = 0.01511
  3. 3. Oklab → LMS′

    l′ = L + 0.3963·a + 0.2158·b = 0.287399
    m′ = L − 0.1056·a − 0.0639·b = 0.285544
    s′ = L − 0.0895·a − 1.2915·b = 0.266920
  4. 4. cube

    l = 0.287399³ = 0.023739
    m = 0.285544³ = 0.023282
    s = 0.266920³ = 0.019017
  5. 5. LMS → linear sRGB

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

    R = 0.16863 × 255 = 43.00 → 43
    G = 0.16863 × 255 = 43.00 → 43
    B = 0.13334 × 255 = 34.00 → 34
  7. 7. RGB → HEX

    #2B2B22

All formats

HEX
#2b2b22
RGB
rgb(43 43 34)
RGB (legacy)
rgb(43, 43, 34)
HSL
hsl(60.00 11.69% 15.10%) → hsl(60 12% 15%)
HWB
hwb(60 13% 83%)
OKLCH
oklch(0.286 0.016 107.4) · oklch(28.6% 0.016 107.4)
OKLab
oklab(0.286 -0.005 0.015)
Lab (D50)
lab(17.30 -1.46 5.90)
LCH (D50)
lch(17.30 6.08 103.93)
Display P3
color(display-p3 0.1686 0.1686 0.1369)
Linear sRGB
color(srgb-linear 0.0242 0.0242 0.0160)

Gamut: sRGB and Display P3

#2B2B22 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.061 and Display P3 reaches 0.071; this color uses 26% of the sRGB chroma available.

CSS snippets

.element {
  color: #2b2b22;
  color: rgb(43 43 34);
  color: hsl(60 12% 15%);
  color: oklch(0.286 0.016 107.4);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.286 0.016 107.4);
}
/* arbitrary values */
class="text-[#2b2b22] bg-[oklch(0.286_0.016_107.4)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.1686 0.1686 0.1369); }
}

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

  • #3A3A31 · oklch(0.346 0.016 107.4) · ΔL +0.06
  • #1D1D14 · oklch(0.226 0.016 107.4) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?