HEX to HSL: #F8F8FF
Also known as: CSS ghostwhite
Result
#F8F8FF → hsl(240 100% 99%)
Values are shown at full precision, so converting back gives exactly #f8f8ff. 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. RGB ÷ 255
R = 0.9725 G = 0.9725 B = 1.0000
2. max, min, Δ
max = 1.0000 min = 0.9725 Δ = max − min = 0.0275
3. L
L = (max + min) / 2 = 0.9863 = 98.63%
4. S
S = Δ / (1 − |2L − 1|) = 1.0000 = 100.00%
5. H
max is B → H = 60° × ((R − G) / Δ + 4) = 60° × ((0.9725 − 0.9725) / 0.0275 + 4) = 240.00°
6. HSL
hsl(240.00 100.00% 98.63%)
All formats
- HEX
- #f8f8ff
- RGB
- rgb(248 248 255)
- RGB (legacy)
- rgb(248, 248, 255)
- HSL
- hsl(240.00 100.00% 98.63%) → hsl(240 100% 99%)
- HWB
- hwb(240 97% 0%)
- OKLCH
- oklch(0.981 0.009 286.2) · oklch(98.1% 0.009 286.2)
- OKLab
- oklab(0.981 0.003 -0.009)
- Lab (D50)
- lab(97.73 0.93 -3.36)
- LCH (D50)
- lch(97.73 3.49 285.47)
- Display P3
- color(display-p3 0.9725 0.9725 0.9976)
- Linear sRGB
- color(srgb-linear 0.9387 0.9387 1.0000)
Gamut: sRGB and Display P3
#F8F8FF is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.009 and Display P3 reaches 0.010; this color uses 100% of the sRGB chroma available.
CSS snippets
.element {
color: #f8f8ff;
color: rgb(248 248 255);
color: hsl(240 100% 99%);
color: oklch(0.981 0.009 286.2);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.981 0.009 286.2);
}
/* arbitrary values */
class="text-[#f8f8ff] bg-[oklch(0.981_0.009_286.2)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.9725 0.9725 0.9976); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #f8f8ff calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- slate-50#F8FAFC
- purple-50#FAF5FF
- gray-50#F9FAFB
- mauve-50#FAFAFA
- aliceblue#F0F8FF
- sky-50#F0F9FF
- mist-50#F9FBFB
- stone-50#FAFAF9
Lighter and darker, same hue and chroma
- #FEFEFF · oklch(1.000 0.009 286.2) · ΔL +0.06
- #E4E4EB · oklch(0.921 0.009 286.2) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?