OKLCH to HEX: #064E3B

Also known as: Tailwind v3 emerald-900

Result

oklch(0.37805 0.07303 168.940) → #064E3B

Values are shown at full precision, so converting back gives exactly #064e3b. 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.37805 0.07303 168.940)
  2. 2. OKLCH → Oklab

    a = C·cos H = -0.07167
    b = C·sin H = 0.01401
  3. 3. Oklab → LMS′

    l′ = L + 0.3963·a + 0.2158·b = 0.352666
    m′ = L − 0.1056·a − 0.0639·b = 0.384721
    s′ = L − 0.0895·a − 1.2915·b = 0.366370
  4. 4. cube

    l = 0.352666³ = 0.043862
    m = 0.384721³ = 0.056943
    s = 0.366370³ = 0.049177
  5. 5. LMS → linear sRGB

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

    R = 0.02356 × 255 = 6.01 → 6
    G = 0.30588 × 255 = 78.00 → 78
    B = 0.23138 × 255 = 59.00 → 59
  7. 7. RGB → HEX

    #064E3B

All formats

HEX
#064e3b
RGB
rgb(6 78 59)
RGB (legacy)
rgb(6, 78, 59)
HSL
hsl(164.17 85.71% 16.47%) → hsl(164 86% 16%)
HWB
hwb(164 2% 69%)
OKLCH
oklch(0.378 0.073 168.9) · oklch(37.8% 0.073 168.9)
OKLab
oklab(0.378 -0.072 0.014)
Lab (D50)
lab(28.82 -25.46 5.17)
LCH (D50)
lch(28.82 25.98 168.51)
Display P3
color(display-p3 0.1285 0.3010 0.2358)
Linear sRGB
color(srgb-linear 0.0018 0.0762 0.0437)

Gamut: sRGB and Display P3

#064E3B is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.076 and Display P3 reaches 0.103; this color uses 96% of the sRGB chroma available.

CSS snippets

.element {
  color: #064e3b;
  color: rgb(6 78 59);
  color: hsl(164 86% 16%);
  color: oklch(0.378 0.073 168.9);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.378 0.073 168.9);
}
/* arbitrary values */
class="text-[#064e3b] bg-[oklch(0.378_0.073_168.9)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.1285 0.3010 0.2358); }
}

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

  • #1F5F4B · oklch(0.438 0.073 168.9) · ΔL +0.06
  • #003E2C · oklch(0.318 0.073 168.9) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?