Skip to content

White

White is pure white, the lightest possible color. Hex code #FFFFFF.

White#FFFFFF

White color codes

  • CSS namewhite
  • HEX#FFFFFF
  • RGBrgb(255, 255, 255)
  • HSLhsl(0, 0%, 100%)
  • OKLCHoklch(100% 0 0)
HSB and CMYK values
  • HSB / HSVhsb(0, 0%, 100%)
  • CMYKC0 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

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.

GrayHexLightnessContrast with white
Black#0000000%21.00:1
Dark slate gray#2F4F4F40%8.92:1
Dim gray#69696952%5.48:1
Slate gray#70809059%4.05:1
Gray#80808060%3.94:1
Light slate gray#77889962%3.64:1
Dark gray#A9A9A973%2.35:1
Silver#C0C0C081%1.81:1
Light gray#D3D3D387%1.49:1
Gainsboro#DCDCDC89%1.37:1
White smoke#F5F5F597%1.09:1
White#FFFFFF100%–

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.