HEX to HSL: #008236

Also known as: Tailwind green-700

Result

#008236 → hsl(145 100% 25%)

Values are shown at full precision, so converting back gives exactly #008236. 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. RGB ÷ 255

    R = 0.0000
    G = 0.5098
    B = 0.2118
  2. 2. max, min, Δ

    max = 0.5098
    min = 0.0000
    Δ = max − min = 0.5098
  3. 3. L

    L = (max + min) / 2 = 0.2549 = 25.49%
  4. 4. S

    S = Δ / (1 − |2L − 1|) = 1.0000 = 100.00%
  5. 5. H

    max is G → H = 60° × ((B − R) / Δ + 2) = 60° × ((0.2118 − 0.0000) / 0.5098 + 2) = 144.92°
  6. 6. HSL

    hsl(144.92 100.00% 25.49%)

All formats

HEX
#008236
RGB
rgb(0 130 54)
RGB (legacy)
rgb(0, 130, 54)
HSL
hsl(144.92 100.00% 25.49%) → hsl(145 100% 25%)
HWB
hwb(145 0% 49%)
OKLCH
oklch(0.530 0.149 149.0) · oklch(53.0% 0.149 149.0)
OKLab
oklab(0.530 -0.128 0.077)
Lab (D50)
lab(47.27 -44.87 31.58)
LCH (D50)
lch(47.27 54.87 144.86)
Display P3
color(display-p3 0.2199 0.5019 0.2472)
Linear sRGB
color(srgb-linear 0.0000 0.2232 0.0369)

Gamut: sRGB and Display P3

#008236 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.149 and Display P3 reaches 0.209; this color uses 100% of the sRGB chroma available.

CSS snippets

.element {
  color: #008236;
  color: rgb(0 130 54);
  color: hsl(145 100% 25%);
  color: oklch(0.530 0.149 149.0);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.530 0.149 149.0);
}
/* arbitrary values */
class="text-[#008236] bg-[oklch(0.530_0.149_149.0)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.2199 0.5019 0.2472); }
}

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

  • #269448 · oklch(0.590 0.149 149.0) · ΔL +0.06
  • #007024 · oklch(0.470 0.149 149.0) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?