White
White is pure white, the lightest possible color. Hex code #FFFFFF.
White color codes
- CSS name
white - HEX
#FFFFFF - RGB
rgb(255, 255, 255) - HSL
hsl(0, 0%, 100%) - OKLCH
oklch(100% 0 0)
HSB and CMYK values
- HSB / HSV
hsb(0, 0%, 100%) - CMYK
C0 M0 Y0 K0
White text
1.00:1 · fails WCAG
Black text
21.00:1 · passes WCAG AAA
Shades of white
A darker shade of white is #D4D4D4 (100).
Colors that go with white
Tones
White has no complementary color: grays, black and white have no hue to turn around the color wheel.
Click a color to copy its hex code.
Colors similar to white
- Snow#FFFAFA
Almost the same, a faint pink tint
- Mint cream#F5FFFA
Almost the same, a faint green tint
- Azure#F0FFFF
Almost the same, a faint cyan tint
- Floral white#FFFAF0
Almost the same, a faint orange tint
- Ivory#FFFFF0
A faint yellow tint
- Ghost white#F8F8FF
Slightly darker, a faint blue tint
Each compared with white.
About this color
White in CSS and design
White is one of the 16 basic color keywords, which come from the VGA palette by way of HTML. These four lines all give the same white:
color: white;
color: #FFFFFF;
color: rgb(255, 255, 255);
color: hsl(0, 0%, 100%);What to know about white
White is #FFFFFF, every channel at full, the lightest color a screen can show. The near-whites of CSS sit a few steps below it in one or two channels: snow (#FFFAFA) has a little less green and blue, which gives it a faint pink tint, and ghost white (#F8F8FF) a little less red and green, for a blue one. White text reaches WCAG AA (4.5:1) on 30 of the 139 named colors, among them navy, maroon, purple and dim gray.
White and the other grays
White is the light end of the gray scale. As text on white, black, dark slate gray and dim gray reach the 4.5:1 contrast that WCAG AA asks for.
| Gray | Hex | Lightness | Contrast with white |
|---|---|---|---|
| Black | #000000 | 0% | 21.00:1 |
| Dark slate gray | #2F4F4F | 40% | 8.92:1 |
| Dim gray | #696969 | 52% | 5.48:1 |
| Slate gray | #708090 | 59% | 4.05:1 |
| Gray | #808080 | 60% | 3.94:1 |
| Light slate gray | #778899 | 62% | 3.64:1 |
| Dark gray | #A9A9A9 | 73% | 2.35:1 |
| Silver | #C0C0C0 | 81% | 1.81:1 |
| Light gray | #D3D3D3 | 87% | 1.49:1 |
| Gainsboro | #DCDCDC | 89% | 1.37:1 |
| White smoke | #F5F5F5 | 97% | 1.09:1 |
| White | #FFFFFF | 100% | – |
Lightness is OKLCH lightness, which follows how light a color looks.
Frequently asked questions
What is the hex code for white?
#FFFFFF. In CSS you can also use the keyword white, which works in every browser.
What is white in RGB and HSL?
In RGB it is rgb(255, 255, 255) and in HSL hsl(0, 0%, 100%). In CMYK it is about C0 M0 Y0 K0, though printed colors vary with paper and ink.
Should I use black or white text on white?
Black text works better: it has a contrast ratio of 21.00:1 and passes WCAG AAA. White text reaches 1.00:1.
What is the complementary color of white?
White has no complementary color. A complement is found by turning a color's hue halfway around the color wheel, and grays, black and white have no hue to turn.
Which colors go with white?
As a neutral, white goes with almost any color. Its own tones, from #6F6F6F to #FFFFFF, make a calm palette, and a single vivid accent stands out against it.