# Purple Color Code: #800080 Hex, RGB & Palettes

The CSS purple reference is #800080, rgb(128, 0, 128), or hsl(300, 100%, 25.1%). 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% | #E6CCE6 | rgb(230, 204, 230) | hsl(300, 34.21%, 85.1%) | 14.14:1 | 1.48:1 |
| Tint 40% | #B366B3 | rgb(179, 102, 179) | hsl(300, 33.62%, 55.1%) | 5.47:1 | 3.84:1 |
| Reference | #800080 | rgb(128, 0, 128) | hsl(300, 100%, 25.1%) | 2.23:1 | 9.42:1 |
| Shade 25% | #600060 | rgb(96, 0, 96) | hsl(300, 100%, 18.82%) | 1.67:1 | 12.60:1 |
| Shade 50% | #400040 | rgb(64, 0, 64) | hsl(300, 100%, 12.55%) | 1.29:1 | 16.25: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.

CSS purple is darker than many colors informally called purple. Use the code, not the name alone, when handing a palette to engineering.

## How to use purple in product design

Purple can distinguish a brand accent, a special workflow, or an annotation category. Give it a stable role so users can tell a feature highlight from a state that needs action.

### A UI example to try

An automation builder can mark automation-related controls with purple while using neutral containers for the rest of the form. Keep errors and validation separate from that category styling.

### Work through a real screen

Test purple on a primary action, a focused control, and a selected item. These can share a brand family while still requiring separate role definitions and state treatments. Keep the rest of the specimen quiet enough to evaluate whether the intended next action stands out.

### Compare nearby colors by purpose

Compare purple with lavender for a supporting surface and magenta for a more intense accent. A lavender background does not automatically make every purple label readable; verify each approved foreground and surface pair.

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 {
  --purple-100: #E6CCE6;
  --purple-300: #B366B3;
  --purple-500: #800080;
  --purple-700: #600060;
  --purple-900: #400040;
}
```

## What is the HEX code for purple?

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

## Is purple accessible?

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

## Related colors

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

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

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

## 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/purple/

## 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/)
