CSS Named Color Reference

Blue Color Code

Blue·#0000FF

Blue FamilyCoolMid toneHigh saturationoklch(45.2% 0.313 264)
HEX
#0000FFPrimary token
RGB
rgb(0, 0, 255)Screen values
HSL
hsl(240 100% 50%)Hue and lightness
CMYK
100, 100, 0, 0Print handoff
LAB
32, 79, -108Perceptual reference
OKLCH
oklch(45.2% 0.313 264)Modern perceptual

Blue is the canonical CSS named blue at #0000FF. It is more saturated and absolute than Royal Blue, making it useful when you need a direct digital primary, a legacy web reference, or an unmistakable link-state blue.

Best text colorWhite text
Body text contrast8.59:1
Best UseDirect digital primary, links, and explicit system states

Tonal Scale

100#D1D1FF
300#8A8AFF
500#2E2EFF
600#0000FF
800#0000B8

Contrast Checks

White text on this color

Buttons, badges, and filled actions.

8.59:1AAA-level contrast

Dark text on this color

Large headings and selective UI.

2.00:1Needs more separation

This color on light surface

Links, borders, and icons on light UI.

8.16:1AAA-level contrast
Best text colorWhite textContrast 8.59:1

Professional Reference

OKLCHoklch(45.2% 0.313 264)
Relative Luminance0.0722
Source TypeCSS Named Color
Classification
Blue FamilyCoolMid toneHigh saturation
Source Context
Source Type
CSS Named Color
System
CSS
Closest Matches
Material Deep Purple A400Material Deep Purple A700Medium Blue

Accessibility Matrix

White text on this color

White text placed on the current color.

8.59:1AAA

Dark text on this color

Dark text or headings on the current color.

2.00:1Needs more separation

This color on light surface

Use this color for links, strokes, or icons on light UI.

8.16:1AAA

This color on dark surface

Use this color inside dark shells for strokes, tags, or icons.

2.00:1Needs more separation
Best text colorWhite textContrast 8.59:1 · AAA

Where It Works

  • Links, status emphasis, and explicit system feedback.
  • Best in focused UI, not large surfaces.
  • Pairs with white, ink-dark neutrals, and lighter blues.

Reference Notes

Last Updated
2026-06-25
Source Library
CSS Standard Colors
Methodology
Verified source values + site guidance
Color Notes

Blue is sourced from the published CSS Standard Colors library and retained here as a searchable reference swatch for product and interface reference work.

Hue Family

Trust-building blues for enterprise and SaaS.

Source Collections
CSS Named Colors

Related Colors

Palette Starting Points

Implementation Snippets

CSS Variables
:root {
  --color-blue: #0000FF;
  --color-blue-rgb: 0 0 255;
}
Utility Class
class="bg-[#0000FF] text-white"
class="hover:bg-[#0000B8] ring-1 ring-[#0000FF]"
JSON Token
{
  "blue": "#0000FF",
  "blueRgb": [0, 0, 255],
  "blueHsl": [240, 100, 50]
}