#F8F9FA: Bootstrap light gray codes, contrast and shades
By TechCompare · Updated · How we check
#F8F9FA is rgb(248, 249, 250), the $gray-100 of Bootstrap 4 and 5 and the value behind its light theme color. Dark text belongs on it: black scores 19.92:1, white only 1.05:1.
Color Codes
- HEX
#F8F9FA - RGB
rgb(248, 249, 250) - HSL
hsl(210, 17%, 98%) - OKLCH
oklch(98.16% 0.0017 247.84)
Text on #F8F9FA
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
Black Text
Aa
The quick brown fox jumps over the lazy dog.
19.92:1APCA Lc 102.4
- AA Normal (4.5:1)Pass
- AA Large (3:1)Pass
- AAA Normal (7:1)Pass
- AAA Large (4.5:1)Pass
WCAG 2 ratios are the same whichever color is the text, so they also hold for #F8F9FA 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.
#F8F9FA mixes 248 red, 249 green and 250 blue, a near white with the faintest cool tint. Bootstrap calls it $gray-100, the lightest step of its gray scale, and sets its light theme color to it. So .bg-light, .btn-light and .table-light all start from #F8F9FA. The cards above give its codes and test white and black text on it. There's no room for lighter steps above it, so the shade scale below goes 8 steps darker.
Shades
Same hue and chroma in OKLCH, with even steps of lightness. Open any shade in the Color Picker.
Nearest Named Colors
CSS Name
ghostwhite
#F8F8FF
Very CloseΔE OK 0.008Tailwind 4
slate-50
oklch(98.4% 0.003 247.858)
Very CloseΔE OK 0.003Tailwind 3
gray-50
#F9FAFB
Very CloseΔE OK 0.003
About #F8F9FA
Bootstrap 5.3 added color modes, with background variables that follow them. $body-tertiary-bg is also $gray-100, so in light mode .bg-body-tertiary gives the same #F8F9FA. The two split in dark mode: .bg-body-tertiary switches to a dark gray, while .bg-light stays this pale color. If a light panel should turn dark along with the rest of the page, use .bg-body-tertiary.
Tailwind has no exact match. Tailwind 3's gray-50 (#F9FAFB) is 0.003 away in OKLab, close enough that you won't see a difference.
Against white, #F8F9FA sits only 1.05:1 away. A light panel on a white page reads as a soft tint, so give it a border if its edge matters. Text has plenty of room on it: black scores 19.92:1, past AAA at any size.
Verdict
Use #F8F9FA for light sections, cards, sidebars, table headers and secondary buttons, with dark text. Keep white text and white icons off it, at 1.05:1.
In the shade scale, white text first passes AA on the fifth darker step, #727374, at 4.75:1. The first darker step, #DCDDDE, makes a soft border or hover state and still takes black text at 15.44:1. Click a shade to open it in the Color Picker.
More Color scenarios
Related guides
Frequently asked questions
What color is #F8F9FA?
Is #F8F9FA the same as Bootstrap's bg-light?
What's the difference between #F8F9FA and #F8FAFC?
Related tools
Contrast Checker
Check color contrast ratios for WCAG AA/AAA accessibility compliance.
Use toolJSON Formatter
Validate, format, and minify JSON. Browse it as a tree, run JSONPath queries, compare two documents, or validate against a JSON Schema.
Use toolAspect Ratio Visualizer
Visually compare width differences between 16:9, 21:9, and 32:9 monitors.
Use tool