Inspect Blue (#0000FF) in HEX, RGB, HSL, LCH and OKLCH, check its contrast, and copy the value you need.
Blue
#0000FF
White text reads best on this background, at 8.59:1.
Blue is one of the 148 CSS named colors, and resolves to #0000FF in every browser. In numbers that is rgb(0, 0, 255) and hsl(240, 100%, 50%). Perceptually it is a mid-toned, vivid color: OKLCH puts its lightness at 45% and its chroma at 0.313. It sits in the blues at 264 degrees of OKLCH hue, and reads as a cool color.
White text clears WCAG AA on a Blue background at 8.59:1, and AAA as well. At this chroma it is loud enough to be an accent or a call to action, but it will fight anything else vivid placed next to it.
The closest CSS named colors to Blue, measured with CIEDE2000, are MediumBlue (#0000CD), BlueViolet (#8A2BE2), DarkViolet (#9400D3). If Blue is not quite right, those are the nearest keywords to try before reaching for a custom value.
HEX
#0000FF
RGB
rgb(0, 0, 255)
HSL
hsl(240, 100%, 50%)
HWB
hwb(240 0% 0%)
CMYK
cmyk(100%, 100%, 0%, 0%)
LAB
lab(29.57 68.29 -112.03)
LCH
lch(29.57 131.2 301.36)
OKLCH
oklch(45.2% 0.3132 264.05)
WCAG asks for 4.5:1 between body text and its background. On #0000FF white text measures 8.59:1 and black text 2.44:1, so white clears it and black does not.
White text on Blue
WCAG 2.2
8.59:1
APCA
Lc 90
Passes AA body text
Passes AAA body text
Passes AA large text
Black text on Blue
WCAG 2.2
2.44:1
APCA
Lc 18
Fails AA body text
Fails AAA body text
Fails AA large text
Check Blue against any other color in the contrast checker.
Blue sits at 45% OKLCH lightness. Holding its hue and chroma and moving only that value carries it up to #F5F9FF and down to #000220, which keeps the family recognizable instead of letting it drift toward gray the way a plain HSL ramp does.
#2460FF
20% lighter
#5A8DFF
40% lighter
#8EB3FF
60% lighter
#C1D6FF
80% lighter
#F5F9FF
100% lighter
#0025B9
20% darker
#001B8F
40% darker
#001068
60% darker
#000742
80% darker
#000220
100% darker
Build a full accessible scale from #0000FF in the shade generator.
Hues rotated around #0000FF in OKLCH, then pulled back into the sRGB gamut. Each swatch is labelled with the nearest CSS named color so you have a keyword to start from.
Blue sits at 264 degrees. Rotating it a half turn lands on 84 degrees, the hue directly opposite. It is the strongest pairing you can make without changing lightness, and the one most likely to vibrate if you use both at full chroma.
The neighbors of Blue at 234 and 294 degrees. They stay close enough to read as the same family, which is what you want for hover states, secondary surfaces and gradients.
264, 24 and 144 degrees divide the wheel into thirds. Balanced enough to carry a whole palette without one color dominating the other two.
Instead of the complement at 84 degrees, this pair flanks it at 54 and 114. You keep most of the contrast of a complementary pairing while losing the harshness.
Explore more combinations around Blue on the color wheel.
The biggest shift is under achromatopsia, where #0000FF reads as #121213, 37.2 CIEDE2000 units away. If Blue is the only thing marking a state or a series, roughly one viewer in twelve will miss it.
Protanopia
#0019FF
Deuteranopia
#000CF7
Tritanopia
#00264D
Achromatopsia
#121213
The nearest CSS keywords to #0000FF, ranked by perceptual distance rather than by how close their hex digits happen to look.