#F8F8F8 color: near-white gray hex code, RGB and shades
#F8F8F8 is RGB 248, 248, 248, a gray at 97% lightness that is only 7 steps below white. It measures 1.06:1 against white, so it is a quiet page background, and #333333 text on it reaches 11.89:1.
- HEX
#F8F8F8- RGB
rgb(248, 248, 248)- HSL
hsl(0, 0%, 97%)
Best text on it: black at 19.77:1
Every code for #F8F8F8
- HEX
#F8F8F8 - RGB
rgb(248, 248, 248) - HSL
hsl(0, 0%, 97%) - HSV
0°, 0%, 97% - CMYK
0%, 0%, 0%, 3% - Lab
lab(97.6% 0 0) - OKLCH
oklch(97.9% 0 89.9) - Decimal
16316664
Tints, shades and tones
From white to black in 10% steps, with #F8F8F8 in the middle. Tap a code to copy it.
- 90%#FEFEFE
- 80%#FEFEFE
- 70%#FDFDFD
- 60%#FCFCFC
- 50%#FCFCFC
- 40%#FBFBFB
- 30%#FAFAFA
- 20%#F9F9F9
- 10%#F9F9F9
- Base#F8F8F8
- 10%#DFDFDF
- 20%#C6C6C6
- 30%#AEAEAE
- 40%#959595
- 50%#7C7C7C
- 60%#636363
- 70%#4A4A4A
- 80%#323232
- 90%#191919
Tones (mixed with gray)
- 10%#ECECEC
- 20%#E0E0E0
- 30%#D4D4D4
- 40%#C8C8C8
- 50%#BCBCBC
- 60%#B0B0B0
- 70%#A4A4A4
- 80%#989898
- 90%#8C8C8C
Matching colors
#F8F8F8 in 3D color space
OKLab, the space ColorPlum does its math in: lightness runs up the pole, hue goes around it and saturation grows outward. The faint shell is every color a screen can show (saturation is drawn wider than lightness so hues separate). Drag to turn it.
- #F8F8F8
- Triad #F8F8F8
- Triad #F8F8F8
- Complement
- 50% tint
- 50% shade
#F8F8F8 in use
Card body text stays dark for reading; #f8f8f8 carries the header and the button.
Shop nowTagHeadline in #F8F8F8
A paragraph with a link in dark text, because this color is too light for text on white; use it for fills instead.
How it looks with color-vision deficiency
A simulation (Machado and colleagues, 2009) of how the color and its complement read without one type of cone.
- Typical color vision
#F8F8F8 - Protanopia (no red cones)
#F8F8F8 - Deuteranopia (no green cones)
#F8F8F8 - Tritanopia (no blue cones)
#F8F8F8
Contrast and readability
| Pairing | Ratio | WCAG 2.2 |
|---|---|---|
| as text on white | 1.06:1 | AA AA large AAA |
| as text on black | 19.77:1 | AA AA large AAA |
| white text on it | 1.06:1 | AA AA large AAA |
| black text on it | 19.77:1 | AA AA large AAA |
| on your background | 1.07:1 | AA AA large AAA |
Export
:root {
--f8f8f8: #f8f8f8;
--f8f8f8-rgb: 248 248 248;
--f8f8f8-on: #000000;
}On this page
Hex #F8F8F8 is the lightest of the common neutral grays. All three channels are 248, just 7 below the 255 maximum, and HSL puts it at 97% lightness with no hue or saturation at all. The CMYK estimate is 0%, 0%, 0%, 3%, and the decimal value is 16316664. Put it next to pure white and most screens show a difference only if you look for it.
Why it makes a good page background
Pure white backgrounds can glare, especially in a bright room. #F8F8F8 takes a little of that brightness away while keeping the page looking clean and unmistakably light. Because the ratio against white is just 1.06:1, you can set white cards, form fields and images on top of it and they will lift off the page softly. Compare that with #F0F0F0, which makes a more obvious panel, or #EEEEEE, which already reads as gray. If you want white content to float on a barely tinted ground, this is the step to try first.
Text and accents on it
The best text color on it is a dark neutral: #333333 measures 11.89:1, and a navy such as #112233 is higher still. A deep red like #990000 gives 8.39:1, while the raspberry red #AA1234 gives 6.94:1. Both pass AA for body text, and the first also passes AAA. On a black background, the page color itself has a ratio of 19.77:1, the highest of the four light grays in this family.
Names
Many CSS names sit close by: ghostwhite (#F8F8FF) and whitesmoke (#F5F5F5) are each 0.9 OKLab units away, snow (#FFFAFA) is 1.1 and aliceblue is 1.3. These are all tinted versions of white, so none is truly neutral. In the xkcd survey the nearest answers are "very light pink" at 1.3 and "pale grey" at 1.5, followed by plain "white" at 2.1.
Tints and shades
There is almost no room above this color, so the tints bunch up: #F9F9F9, #F9F9F9, #FAFAFA, and #FBFBFB, ending at #FEFEFE. The tint strip repeats some values because the channel only has seven steps left. The shades give you far more to work with: #DFDFDF at 10%, #C6C6C6 at 20%, and #AEAEAE at 30%. A 10% shade is a good border color for the white cards on this page.
Worked example
A local bakery asks you for a one-page website. Set the page background to #F8F8F8, make the menu card white, and use #333333 for the text. The white card against the gray reads as a soft sheet of paper, and the text stays at 11.89:1. For the "Order now" button, use #AA1234 with white text; the pair measures 7.38:1, so the label is clear even outdoors in bright sun. Resist the urge to add a border to the card. If you need more separation later, the #DFDFDF shade is the first thing to try.
Sources
- W3C, CSS Color Module Level 4: hex notation, sRGB and named colors (checked 2026-11-10) w3.org
- W3C, Web Content Accessibility Guidelines (WCAG) 2.2: contrast minimum (checked 2026-11-10) w3.org
- xkcd, Color survey results: the 954 most common color names (Randall Munroe, 2010; checked 2026-11-10) xkcd.com