# White Color Code: #FFFFFF Hex, RGB & Palettes

The CSS white reference is #FFFFFF, rgb(255, 255, 255), or hsl(0, 0%, 100%). Brand shades may differ. HEX and RGB encode the same sRGB reference; HSL is rounded to two decimals. These are screen values, not a CMYK print specification.

## Tints and shades

Illustrative mixes with white or black in encoded sRGB channels, not a perceptually uniform scale.

| Shade | HEX | RGB | HSL | Black text contrast | White text contrast |
| --- | --- | --- | --- | --- | --- |
| Tint 80% | #FFFFFF | rgb(255, 255, 255) | hsl(0, 0%, 100%) | 21.00:1 | 1.00:1 |
| Tint 40% | #FFFFFF | rgb(255, 255, 255) | hsl(0, 0%, 100%) | 21.00:1 | 1.00:1 |
| Reference | #FFFFFF | rgb(255, 255, 255) | hsl(0, 0%, 100%) | 21.00:1 | 1.00:1 |
| Shade 25% | #BFBFBF | rgb(191, 191, 191) | hsl(0, 0%, 74.9%) | 11.42:1 | 1.84:1 |
| Shade 50% | #808080 | rgb(128, 128, 128) | hsl(0, 0%, 50.2%) | 5.32:1 | 3.95:1 |

## Text contrast

AA ordinary text requires at least 4.5:1; large text requires at least 3:1. Large text is at least 18pt, or 14pt bold. Use unrounded ratios for decisions. Color pairs alone cannot certify accessibility; review criteria, states, context, and exceptions.

White text depends entirely on the surface behind it. Recheck labels on bright brand colors, hover states, images, and disabled treatments separately.

## How to use white in product design

White can be a canvas, a raised surface, or foreground content on a dark component. These are separate roles even when they share the same value in a particular theme.

### A UI example to try

A white settings panel on a pale canvas needs enough structure to distinguish controls from decoration. Use headings, spacing, and necessary boundaries rather than adding a shadow to every element.

### Work through a real screen

Use white as the base of a form and inspect where controls, cards, and navigation begin and end. When neighboring surfaces are also white, spacing, borders, and elevation may carry the grouping. Decide which boundaries are essential rather than adding a shadow to every container.

### Compare nearby colors by purpose

Compare white with beige or a light gray when choosing a page canvas. Keep a stable role for surfaces and verify text, placeholders, and state indicators on each one. White is not a universal safe background for every bright accent or pale label.

1. Choose a foreground, surface, accent, or status role and name a semantic token after its purpose.
2. Test the actual pair, text size, interaction states, and themes.
3. Document the approved value and companion colors. Keep labels and non-color cues for states.

## CSS palette

Illustrative numeric tokens; connect tested pairs to semantic roles.

```css
:root {
  --white-100: #FFFFFF;
  --white-300: #FFFFFF;
  --white-500: #FFFFFF;
  --white-700: #BFBFBF;
  --white-900: #808080;
}
```

## What is the HEX code for white?

The CSS named color white is #FFFFFF. Use a documented brand token when you mean another shade.

## Is white accessible?

A color alone cannot pass or fail accessibility. Evaluate the pair, content size, interaction state, and meaning in the complete interface.

## Related colors

- [black color codes](https://designproject.io/resources/colors/black/)

- [gray color codes](https://designproject.io/resources/colors/gray/)

- [beige color codes](https://designproject.io/resources/colors/beige/)

## Sources and next steps

By The Design Project. UI examples and generated scales are illustrative.

- [MDN CSS named colors](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/named-color)
- [W3C contrast guidance](https://www.w3.org/WAI/WCAG22/Understanding/contrast-minimum.html)
- [UI color palette guide](https://designproject.io/resources/guides/create-ui-color-palette/)
- [Semantic color tokens](https://designproject.io/resources/guides/create-semantic-color-tokens/)
- [Color contrast checker](https://designproject.io/resources/guides/check-color-contrast/)
- [Design glossary](https://designproject.io/resources/glossary/)

Canonical: https://designproject.io/resources/colors/white/

## Keep learning

- [How to create a UI color palette, step by step](https://designproject.io/resources/guides/create-ui-color-palette/)
- [Product design glossary: 44 terms explained](https://designproject.io/resources/glossary/)
- [How to create semantic color tokens for UI](https://designproject.io/resources/guides/create-semantic-color-tokens/)
