HEX to HSL: #F87171

Also known as: Tailwind v3 red-400

Result

#F87171 → hsl(0 91% 71%)

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

    max = 0.9725
    min = 0.4431
    Δ = max − min = 0.5294
  3. 3. L

    L = (max + min) / 2 = 0.7078 = 70.78%
  4. 4. S

    S = Δ / (1 − |2L − 1|) = 0.9060 = 90.60%
  5. 5. H

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

    hsl(0.00 90.60% 70.78%)

All formats

HEX
#f87171
RGB
rgb(248 113 113)
RGB (legacy)
rgb(248, 113, 113)
HSL
hsl(0.00 90.60% 70.78%) → hsl(0 91% 71%)
HWB
hwb(0 44% 3%)
OKLCH
oklch(0.711 0.166 22.2) · oklch(71.1% 0.166 22.2)
OKLab
oklab(0.711 0.154 0.063)
Lab (D50)
lab(64.74 52.73 26.67)
LCH (D50)
lch(64.74 59.09 26.83)
Display P3
color(display-p3 0.9070 0.4741 0.4594)
Linear sRGB
color(srgb-linear 0.9387 0.1651 0.1651)

Gamut: sRGB and Display P3

#F87171 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.182 and Display P3 reaches 0.232; this color uses 91% of the sRGB chroma available.

CSS snippets

.element {
  color: #f87171;
  color: rgb(248 113 113);
  color: hsl(0 91% 71%);
  color: oklch(0.711 0.166 22.2);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.711 0.166 22.2);
}
/* arbitrary values */
class="text-[#f87171] bg-[oklch(0.711_0.166_22.2)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.9070 0.4741 0.4594); }
}

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

  • #FF8483 · oklch(0.771 0.166 22.2) · ΔL +0.06
  • #E35E5F · oklch(0.651 0.166 22.2) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?