# Blue Color Code: #0000FF Hex, RGB & Palettes

The CSS blue reference is #0000FF, rgb(0, 0, 255), or hsl(240, 100%, 50%). 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% | #CCCCFF | rgb(204, 204, 255) | hsl(240, 100%, 90%) | 13.65:1 | 1.54:1 |
| Tint 40% | #6666FF | rgb(102, 102, 255) | hsl(240, 100%, 70%) | 4.91:1 | 4.28:1 |
| Reference | #0000FF | rgb(0, 0, 255) | hsl(240, 100%, 50%) | 2.44:1 | 8.59:1 |
| Shade 25% | #0000BF | rgb(0, 0, 191) | hsl(240, 100%, 37.45%) | 1.75:1 | 11.98:1 |
| Shade 50% | #000080 | rgb(0, 0, 128) | hsl(240, 100%, 25.1%) | 1.31:1 | 16.01: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.

Pure CSS blue is highly saturated. It can meet a numeric contrast threshold and still feel visually harsh in a large surface; review comfort and hierarchy separately.

## How to use blue in product design

Blue can support links, selected controls, or a primary action, provided these roles are documented. A blue brand does not mean every interactive element should use the same fill.

### A UI example to try

Use a blue underline for an inline link and a filled button for the main action. Give visited, hover, and keyboard-focus states their own specifications rather than changing only opacity.

### Work through a real screen

Create a specimen with a link, a primary action, and a selected row. Decide whether all three should share a family and how their roles remain distinct through underline, shape, placement, and wording. A blue label without link treatment can be mistaken for ordinary text, while blue decorative text can imply an interaction.

### Compare nearby colors by purpose

Compare blue with navy when a darker surface or foreground is needed, and cyan when a lighter accent is intended. Changing the hue family is not a substitute for checking the actual contrast and interaction hierarchy.

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 {
  --blue-100: #CCCCFF;
  --blue-300: #6666FF;
  --blue-500: #0000FF;
  --blue-700: #0000BF;
  --blue-900: #000080;
}
```

## What is the HEX code for blue?

The CSS named color blue is #0000FF. Use a documented brand token when you mean another shade.

## Is blue accessible?

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

## Related colors

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

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

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

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

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