White Color
HEX #FFFFFF · rgb(255, 255, 255) · hsl(0, 0%, 100%)
White color codes
White is one of the named colors every browser understands. In CSS you can write it as white or #FFFFFF.
| Format | Value | |
|---|---|---|
| HEX | #FFFFFF | |
| RGB | rgb(255, 255, 255) | |
| HSL | hsl(0, 0%, 100%) | |
| CMYK | 0%, 0%, 0%, 0% | |
| CSS name | white |
.example {
color: white;
background-color: #FFFFFF;
border-color: rgb(255, 255, 255);
}
Tints and shades of white
Tints mix the color with white; shades mix it with black.
Contrast and readability
Black text
21.00:1
passes AA and AAA
21.00:1
passes AA and AAA
White text
1.00:1
fails
1.00:1
fails
Use black text on white. Ratios follow the WCAG 2 formula; AA needs 4.5:1 for normal text and 3:1 for large text.
Frequently asked questions
What is the hex code for white?
The hex code for white is #FFFFFF.
What is the RGB value of white?
White is rgb(255, 255, 255): 255 red, 255 green and 255 blue on a 0 to 255 scale.
Does white have a complementary color?
No. White has no hue, so it has no complement. It pairs with any color.
Should text on white be black or white?
Use black text. The contrast ratio is 21.00:1 with black and 1.00:1 with white. WCAG AA asks for at least 4.5:1 for normal text.
Similar named colors
Pick any other color with the color picker, or browse all named colors.