OKLCH to HEX: #0D542B

Also known as: Tailwind green-900

Result

oklch(0.39347 0.09570 152.275) → #0D542B

Values are shown at full precision, so converting back gives exactly #0d542b. 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.39347 0.09570 152.275)
  2. 2. OKLCH → Oklab

    a = C·cos H = -0.08471
    b = C·sin H = 0.04452
  3. 3. Oklab → LMS′

    l′ = L + 0.3963·a + 0.2158·b = 0.369503
    m′ = L − 0.1056·a − 0.0639·b = 0.399569
    s′ = L − 0.0895·a − 1.2915·b = 0.343550
  4. 4. cube

    l = 0.369503³ = 0.050449
    m = 0.399569³ = 0.063794
    s = 0.343550³ = 0.040548
  5. 5. LMS → linear sRGB

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

    R = 0.05096 × 255 = 13.00 → 13
    G = 0.32941 × 255 = 84.00 → 84
    B = 0.16862 × 255 = 43.00 → 43
  7. 7. RGB → HEX

    #0D542B

All formats

HEX
#0d542b
RGB
rgb(13 84 43)
RGB (legacy)
rgb(13, 84, 43)
HSL
hsl(145.35 73.20% 19.02%) → hsl(145 73% 19%)
HWB
hwb(145 5% 67%)
OKLCH
oklch(0.393 0.096 152.3) · oklch(39.3% 0.096 152.3)
OKLab
oklab(0.393 -0.085 0.045)
Lab (D50)
lab(30.86 -29.83 17.69)
LCH (D50)
lch(30.86 34.68 149.33)
Display P3
color(display-p3 0.1476 0.3243 0.1845)
Linear sRGB
color(srgb-linear 0.0040 0.0887 0.0242)

Gamut: sRGB and Display P3

#0D542B is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.103 and Display P3 reaches 0.143; this color uses 93% of the sRGB chroma available.

CSS snippets

.element {
  color: #0d542b;
  color: rgb(13 84 43);
  color: hsl(145 73% 19%);
  color: oklch(0.393 0.096 152.3);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.393 0.096 152.3);
}
/* arbitrary values */
class="text-[#0d542b] bg-[oklch(0.393_0.096_152.3)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.1476 0.3243 0.1845); }
}

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

  • #23653B · oklch(0.453 0.096 152.3) · ΔL +0.06
  • #00431B · oklch(0.333 0.096 152.3) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?