HEX to OKLCH: #022C22

Also known as: Tailwind v3 emerald-950

Result

#022C22 → oklch(0.262 0.049 172.6)

Values are shown at full precision, so converting back gives exactly #022c22. 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: 2/255 = 0.00784 → 0.000607  (÷ 12.92)
    G: 44/255 = 0.17255 → 0.025187  (((x + 0.055) / 1.055)^2.4)
    B: 34/255 = 0.13333 → 0.015996  (((x + 0.055) / 1.055)^2.4)
  2. 2. linear sRGB → LMS

    l = 0.4122·R + 0.5363·G + 0.0514·B = 0.014582
    m = 0.2119·R + 0.6807·G + 0.1074·B = 0.018991
    s = 0.0883·R + 0.2817·G + 0.6300·B = 0.017227
  3. 3. cube root

    l′ = ∛0.014582 = 0.244307
    m′ = ∛0.018991 = 0.266799
    s′ = ∛0.017227 = 0.258265
  4. 4. LMS′ → Oklab

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

    C = √(a² + b²) = 0.04875
    H = atan2(b, a) = 172.552°
    L = 0.26210
  6. 6. OKLCH

    oklch(0.26210 0.04875 172.552)
    rounded: oklch(0.262 0.049 172.6)

All formats

HEX
#022c22
RGB
rgb(2 44 34)
RGB (legacy)
rgb(2, 44, 34)
HSL
hsl(165.71 91.30% 9.02%) → hsl(166 91% 9%)
HWB
hwb(166 1% 83%)
OKLCH
oklch(0.262 0.049 172.6) · oklch(26.2% 0.049 172.6)
OKLab
oklab(0.262 -0.048 0.006)
Lab (D50)
lab(15.04 -17.12 2.28)
LCH (D50)
lch(15.04 17.27 172.42)
Display P3
color(display-p3 0.0607 0.1694 0.1353)
Linear sRGB
color(srgb-linear 0.0006 0.0252 0.0160)

Gamut: sRGB and Display P3

#022C22 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.051 and Display P3 reaches 0.069; this color uses 96% of the sRGB chroma available.

CSS snippets

.element {
  color: #022c22;
  color: rgb(2 44 34);
  color: hsl(166 91% 9%);
  color: oklch(0.262 0.049 172.6);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.262 0.049 172.6);
}
/* arbitrary values */
class="text-[#022c22] bg-[oklch(0.262_0.049_172.6)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.0607 0.1694 0.1353); }
}

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

  • #143B31 · oklch(0.322 0.049 172.6) · ΔL +0.06
  • #001D14 · oklch(0.202 0.049 172.6) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?