Inspect GhostWhite (#F8F8FF) in HEX, RGB, HSL, LCH and OKLCH, check its contrast, and copy the value you need.
GhostWhite
#F8F8FF
Black text reads best on this background, at 19.86:1.
GhostWhite is one of the 148 CSS named colors, and resolves to #F8F8FF in every browser. In numbers that is rgb(248, 248, 255) and hsl(240, 100%, 99%). Perceptually it is a very light, near-neutral color: OKLCH puts its lightness at 98% and its chroma at 0.009. It carries almost no chroma, so it behaves as a neutral rather than as a hue, and belongs with the off-whites.
White text only reaches 1.06:1 here, so black text is the safer pairing at 19.86:1. Because it is this light, GhostWhite works best as a page or card background with dark text over it.
The closest CSS named colors to GhostWhite, measured with CIEDE2000, are WhiteSmoke (#F5F5F5), Snow (#FFFAFA), White (#FFFFFF). If GhostWhite is not quite right, those are the nearest keywords to try before reaching for a custom value.
HEX
#F8F8FF
RGB
rgb(248, 248, 255)
HSL
hsl(240, 100%, 99%)
HWB
hwb(240 97% 0%)
CMYK
cmyk(3%, 3%, 0%, 0%)
LAB
lab(97.73 0.93 -3.36)
LCH
lch(97.73 3.49 285.47)
OKLCH
oklch(98.11% 0.0093 286.23)
WCAG asks for 4.5:1 between body text and its background. On #F8F8FF white text measures 1.06:1 and black text 19.86:1, so black clears it and white does not.
White text on GhostWhite
WCAG 2.2
1.06:1
APCA
Lc 0
Fails AA body text
Fails AAA body text
Fails AA large text
Black text on GhostWhite
WCAG 2.2
19.86:1
APCA
Lc 102
Passes AA body text
Passes AAA body text
Passes AA large text
Check GhostWhite against any other color in the contrast checker.
GhostWhite sits at 98% OKLCH lightness. Holding its hue and chroma and moving only that value carries it down to #050509, which keeps the family recognizable instead of letting it drift toward gray the way a plain HSL ramp does.
#C0C0C6
20% darker
#8A8A91
40% darker
#59595E
60% darker
#2B2B30
80% darker
#050509
100% darker
Build a full accessible scale from #F8F8FF in the shade generator.
The biggest shift is under achromatopsia, where #F8F8FF reads as #F9F9F9, 3.5 CIEDE2000 units away. If GhostWhite is the only thing marking a state or a series, roughly one viewer in twelve will miss it.
Protanopia
#F7F9FF
Deuteranopia
#F6F8FF
Tritanopia
#F7F9FA
Achromatopsia
#F9F9F9
The nearest CSS keywords to #F8F8FF, ranked by perceptual distance rather than by how close their hex digits happen to look.