HEX to HSL: #B22222

Also known as: CSS firebrick

Result

#B22222 → hsl(0 68% 42%)

Values are shown at full precision, so converting back gives exactly #b22222. 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.6980
    G = 0.1333
    B = 0.1333
  2. 2. max, min, Δ

    max = 0.6980
    min = 0.1333
    Δ = max − min = 0.5647
  3. 3. L

    L = (max + min) / 2 = 0.4157 = 41.57%
  4. 4. S

    S = Δ / (1 − |2L − 1|) = 0.6792 = 67.92%
  5. 5. H

    max is R → H = 60° × (((G − B) / Δ) mod 6) = 60° × (((0.1333 − 0.1333) / 0.5647) mod 6) = 0.00°
  6. 6. HSL

    hsl(0.00 67.92% 41.57%)

All formats

HEX
#b22222
RGB
rgb(178 34 34)
RGB (legacy)
rgb(178, 34, 34)
HSL
hsl(0.00 67.92% 41.57%) → hsl(0 68% 42%)
HWB
hwb(0 13% 30%)
OKLCH
oklch(0.497 0.180 26.8) · oklch(49.7% 0.180 26.8)
OKLab
oklab(0.497 0.160 0.081)
Lab (D50)
lab(39.83 56.59 39.19)
LCH (D50)
lch(39.83 68.83 34.70)
Display P3
color(display-p3 0.6414 0.1906 0.1654)
Linear sRGB
color(srgb-linear 0.4452 0.0160 0.0160)

Gamut: sRGB and Display P3

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

CSS snippets

.element {
  color: #b22222;
  color: rgb(178 34 34);
  color: hsl(0 68% 42%);
  color: oklch(0.497 0.180 26.8);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.497 0.180 26.8);
}
/* arbitrary values */
class="text-[#b22222] bg-[oklch(0.497_0.180_26.8)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.6414 0.1906 0.1654); }
}

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

  • #C73934 · oklch(0.557 0.180 26.8) · ΔL +0.06
  • #9D000D · oklch(0.437 0.180 26.8) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?