White hex code

The hex code for white is #FFFFFF, or rgb(255, 255, 255). CSS also accepts the keyword white.

#FFFFFF
HEX#FFFFFF
RGBrgb(255, 255, 255)
HSLhsl(0, 0%, 100%)
HSV / HSBhsv(0, 0%, 100%)
OKLCHoklch(100% 0 0)
CMYKcmyk(0%, 0%, 0%, 0%)
Short HEX#FFF
HEX, 50% opacity#FFFFFF80
RGB, 50% opacityrgb(255 255 255 / 50%)
CSS namewhite
Defined inHTML 4.01 (one of the original 16 color names)

About white

white (#FFFFFF) has all three channels at their maximum. Its hex code can also be written in short form as #FFF.

CSS also names several off-whites, such as whitesmoke (#F5F5F5), snow (#FFFAFA), ivory (#FFFFF0) and ghostwhite (#F8F8FF), which are softer for large backgrounds.

Shades of white

White is lighter than a usual 50 step, so it starts the scale and every other step is darker. The steps follow a lightness curve modeled on Tailwind CSS's default palette; build your own in the Tailwind color generator. For white mixed with white, black or gray in even steps, use the tint and shade generator.

50#FFFFFF100#EFEFEF200#DEDEDE300#C8C8C8400#ACACAC500#9A9A9A600#7E7E7E700#676767800#555555900#464646950#292929

Colors that go with white

White is a neutral color, so hue-based harmonies do not apply: it goes with any hue. Pair it with one accent color, or build a palette in the palette generator.

Text on white

Black text on white: 21:1
TextRatioAA normalAA largeAAA normal
White1:1FailFailFail
Black21:1PassPassPass

Check other pairs in the color contrast checker.

Similar named colors

The CSS named colors closest to white, by deltaE OK distance.

snow #FFFAFAmintcream #F5FFFAazure #F0FFFFfloralwhite #FFFAF0ivory #FFFFF0ghostwhite #F8F8FF

See all 148 on the color names page.

Closest Tailwind CSS colors

white v4: white, #FFFFFF, exact match

white v3: white, #FFFFFF, exact match

Tailwind CSS has white as its own color, so bg-white and text-white give exactly #FFFFFF. A deltaE OK of around 0.02 is roughly the smallest difference most people notice side by side. Browse every shade on the Tailwind CSS colors page.

White with color vision deficiency

White has almost no hue, so it looks the same with any type of color vision deficiency. What matters is its lightness contrast with the colors next to it.

Test a whole palette or image in the color blindness simulator.

Using white in code

.example {
  color: white;                 /* named color */
  background-color: #ffffff;  /* hex */
  border-color: rgb(255, 255, 255);
}

Frequently asked questions

What is the hex code for white?
#FFFFFF, or #FFF in short form. CSS also accepts the keyword white, which means the same color.
What is white in RGB?
rgb(255, 255, 255). In HSL it is hsl(0, 0%, 100%), and in OKLCH oklch(100% 0 0).
What text color goes on white?
Black text has the higher contrast on #FFFFFF: 21:1, which meets AAA for all text. White text reaches 1:1.
What is the closest Tailwind color to white?
Tailwind CSS has white as its own color, so bg-white and text-white give exactly #FFFFFF.
How do I make white transparent?
Add an alpha value. Half-transparent white is #FFFFFF80 as 8-digit HEX (80 is 128 out of 255) or rgb(255 255 255 / 50%).