#F8FAFC: Tailwind slate-50 codes, contrast and shades

By TechCompare · Updated · How we check

#F8FAFC is rgb(248, 250, 252), the slate-50 of Tailwind CSS. Black text reads at 20.07:1, past AAA. White text gets only 1.05:1, so this is a background, not a text color.

#F8FAFC

Color Codes

  • HEX#F8FAFC
  • RGBrgb(248, 250, 252)
  • HSLhsl(210, 40%, 98%)
  • OKLCHoklch(98.42% 0.0034 247.86)

Text on #F8FAFC

White Text

Aa

The quick brown fox jumps over the lazy dog.

1.05:1APCA Lc 0.0

  • AA Normal (4.5:1)Fail
  • AA Large (3:1)Fail
  • AAA Normal (7:1)Fail
  • AAA Large (4.5:1)Fail
Check White Text in Contrast Checker

Black Text

Aa

The quick brown fox jumps over the lazy dog.

20.07:1APCA Lc 102.9

  • AA Normal (4.5:1)Pass
  • AA Large (3:1)Pass
  • AAA Normal (7:1)Pass
  • AAA Large (4.5:1)Pass
Check Black Text in Contrast Checker

WCAG 2 ratios are the same whichever color is the text, so they also hold for #F8FAFC text on a white or black page. APCA is a newer method that isn't part of any WCAG standard, and a minus sign means light text on dark.

#F8FAFC mixes 248 red, 250 green and 252 blue. That's nearly white. Blue sits a little ahead of green and red, which gives it a faint cool tint. In Tailwind CSS it's slate-50, the palest step of the slate grays. The cards above give its codes with copy buttons and test white and black text on it. Since it's already paler than the lightest step the shade scale makes, the scale below only runs darker, in 8 steps toward a dark gray.

Shades

Same hue and chroma in OKLCH, with even steps of lightness. Open any shade in the Color Picker.

  1. Base#F8FAFC
  2. #DCDEE0
  3. #C0C2C4
  4. #A5A7A9
  5. #8B8D8F
  6. #727475
  7. #5A5B5D
  8. #424446
  9. #2C2E2F

Nearest Named Colors

  • CSS Name

    ghostwhite

    #F8F8FF

    Very CloseΔE OK 0.008
  • Tailwind 4

    slate-50

    oklch(98.4% 0.003 247.858)

    ExactΔE OK 0.000
  • Tailwind 3

    slate-50

    #F8FAFC

    ExactΔE OK 0.000

About #F8FAFC

Tailwind CSS 2 had this color as blueGray-50, one of the extra grays you had to import from tailwindcss/colors. Tailwind 3 renamed blueGray to slate and turned the whole palette on by default, and #F8FAFC became slate-50.

Tailwind 4 rewrote its colors in OKLCH, and slate-50 is now oklch(98.4% 0.003 247.858). That converts back to #F8FAFC, the same hex, so this is one color an upgrade doesn't change.

It works as a page background behind white cards, and as the fill for sidebars, table stripes and code blocks. The gap to white is tiny, though: white and #F8FAFC are only 1.05:1 apart. A white card on it needs a border or a shadow to stand out. APCA, a newer method that isn't part of any WCAG standard, scores black text Lc 102.9 and white text Lc 0.0, so both methods agree that only dark text belongs here.

Verdict

Use #F8FAFC for large, quiet areas: page backgrounds, panels, table stripes and hover states on white. Black text on it passes AAA at any size, at 20.07:1. Don't use it for text or icons on white, where it all but vanishes at 1.05:1.

The shade scale keeps the blue tint of slate. White text first passes AA on the fifth darker step, #727475, at 4.70:1, so the lower half of the scale works for dark buttons and headers. The first three darker steps still take black text at AAA, which makes them good borders and pressed states. Click a shade to open it in the Color Picker.

More Color scenarios

Hex to RGB
A hex color code is three RGB numbers written in base 16.
View details
RGB vs CMYK
Screens add light and print adds ink. See one color in both, and why a plain CMYK formula can't promise a print match.
View details
HSL color model
Hue, saturation and lightness, with three live sliders and a table of common colors in hex, RGB and HSL.
View details

Frequently asked questions

What color is #F8FAFC?
A very pale, slightly cool gray that reads as off white: rgb(248, 250, 252), hsl(210, 40%, 98%) or oklch(98.42% 0.0034 247.86). It's slate-50 in Tailwind CSS. CSS has no name for it. The nearest is ghostwhite (#F8F8FF), 0.008 away in OKLab, which looks almost the same.
Is #F8FAFC the same in Tailwind 3 and Tailwind 4?
Yes. Tailwind 4 writes slate-50 as oklch(98.4% 0.003 247.858), and that converts back to #F8FAFC. Many Tailwind colors shifted in version 4, but this one lands on the same hex.
What text color works on #F8FAFC?
Dark text. Black scores 20.07:1 and passes WCAG AAA at any size. White fails every level at 1.05:1. For a dark color with the same tint, try slate-900, #0F172A.
How is #F8FAFC different from #F8F9FA?
#F8F9FA is Bootstrap's light gray. #F8FAFC has a bit more blue (252 against 250), so it's a touch cooler. Side by side they're hard to tell apart.