HEX to OKLCH: #15803D

Also known as: Tailwind v3 green-700

Result

#15803D → oklch(0.527 0.137 150.1)

Values are shown at full precision, so converting back gives exactly #15803d. 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: 21/255 = 0.08235 → 0.007499  (((x + 0.055) / 1.055)^2.4)
    G: 128/255 = 0.50196 → 0.215861  (((x + 0.055) / 1.055)^2.4)
    B: 61/255 = 0.23922 → 0.046665  (((x + 0.055) / 1.055)^2.4)
  2. 2. linear sRGB → LMS

    l = 0.4122·R + 0.5363·G + 0.0514·B = 0.121265
    m = 0.2119·R + 0.6807·G + 0.1074·B = 0.153537
    s = 0.0883·R + 0.2817·G + 0.6300·B = 0.090872
  3. 3. cube root

    l′ = ∛0.121265 = 0.494970
    m′ = ∛0.153537 = 0.535473
    s′ = ∛0.090872 = 0.449583
  4. 4. LMS′ → Oklab

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

    C = √(a² + b²) = 0.13710
    H = atan2(b, a) = 150.069°
    L = 0.52730
  6. 6. OKLCH

    oklch(0.52730 0.13710 150.069)
    rounded: oklch(0.527 0.137 150.1)

All formats

HEX
#15803d
RGB
rgb(21 128 61)
RGB (legacy)
rgb(21, 128, 61)
HSL
hsl(142.43 71.81% 29.22%) → hsl(142 72% 29%)
HWB
hwb(142 8% 50%)
OKLCH
oklch(0.527 0.137 150.1) · oklch(52.7% 0.137 150.1)
OKLab
oklab(0.527 -0.119 0.068)
Lab (D50)
lab(46.88 -41.65 27.62)
LCH (D50)
lch(46.88 49.97 146.45)
Display P3
color(display-p3 0.2334 0.4945 0.2677)
Linear sRGB
color(srgb-linear 0.0075 0.2159 0.0467)

Gamut: sRGB and Display P3

#15803D is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.145 and Display P3 reaches 0.202; this color uses 95% of the sRGB chroma available.

CSS snippets

.element {
  color: #15803d;
  color: rgb(21 128 61);
  color: hsl(142 72% 29%);
  color: oklch(0.527 0.137 150.1);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.527 0.137 150.1);
}
/* arbitrary values */
class="text-[#15803d] bg-[oklch(0.527_0.137_150.1)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.2334 0.4945 0.2677); }
}

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

  • #2F924E · oklch(0.587 0.137 150.1) · ΔL +0.06
  • #006E2C · oklch(0.467 0.137 150.1) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?