HEX to HSL: #F8FAFC

Also known as: Tailwind slate-50, Tailwind v3 slate-50

Result

#F8FAFC → hsl(210 40% 98%)

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

    max = 0.9882
    min = 0.9725
    Δ = max − min = 0.0157
  3. 3. L

    L = (max + min) / 2 = 0.9804 = 98.04%
  4. 4. S

    S = Δ / (1 − |2L − 1|) = 0.4000 = 40.00%
  5. 5. H

    max is B → H = 60° × ((R − G) / Δ + 4) = 60° × ((0.9725 − 0.9804) / 0.0157 + 4) = 210.00°
  6. 6. HSL

    hsl(210.00 40.00% 98.04%)

All formats

HEX
#f8fafc
RGB
rgb(248 250 252)
RGB (legacy)
rgb(248, 250, 252)
HSL
hsl(210.00 40.00% 98.04%) → hsl(210 40% 98%)
HWB
hwb(210 97% 1%)
OKLCH
oklch(0.984 0.003 247.9) · oklch(98.4% 0.003 247.9)
OKLab
oklab(0.984 -0.001 -0.003)
Lab (D50)
lab(98.16 -0.42 -1.21)
LCH (D50)
lch(98.16 1.28 250.79)
Display P3
color(display-p3 0.9739 0.9801 0.9874)
Linear sRGB
color(srgb-linear 0.9387 0.9560 0.9734)

Gamut: sRGB and Display P3

#F8FAFC is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.008 and Display P3 reaches 0.009; this color uses 43% of the sRGB chroma available.

CSS snippets

.element {
  color: #f8fafc;
  color: rgb(248 250 252);
  color: hsl(210 40% 98%);
  color: oklch(0.984 0.003 247.9);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.984 0.003 247.9);
}
/* arbitrary values */
class="text-[#f8fafc] bg-[oklch(0.984_0.003_247.9)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.9739 0.9801 0.9874); }
}

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

  • #FDFFFF · oklch(1.000 0.003 247.9) · ΔL +0.06
  • #E4E6E8 · oklch(0.924 0.003 247.9) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?