CSS named color
Blue
#0000FF
HEX
#0000ffRGB
rgb(0, 0, 255)HSL
hsl(240, 100%, 50%)OKLCH
oklch(45.20% 0.3132 264.05)NAME
bluePalette
Complementary
180° on the color wheelAnalogous
±30° around the base hueLeft
#007FFF
Right
#7F00FF
Triadic
±120° for harmonic contrastShades
Lighter and darker variantsCSS usage
By name
color: blue;
background-color: blue;By HEX
color: #0000ff;
background-color: #0000ff;By RGB
color: rgb(0, 0, 255);
background-color: rgb(0, 0, 255);By HSL
color: hsl(240, 100%, 50%);
background-color: hsl(240, 100%, 50%);WCAG contrast vs white
Aa
8.59:1
AAA
WCAG contrast vs black
Aa
2.44:1
Below minimum
Related colors
FAQ — Blue
What is the HEX code for Blue?
The HEX code for Blue is #0000FF. It's one of the 148 named CSS colors and can be used directly in CSS as color: blue; or color: #0000ff;
What is Blue in RGB?
Blue in RGB is rgb(0, 0, 255) — red 0, green 0, blue 255.
What is Blue in HSL?
Blue in HSL is hsl(240, 100%, 50%) — hue 240°, saturation 100%, lightness 50%.
What is the complementary color of Blue?
The complementary color (directly opposite Blue on the color wheel) is #FFFF00. The two together produce maximum contrast.
Is white text readable on Blue?
The WCAG contrast ratio against white (#FFFFFF) is 8.59:1, and against black (#000000) it's 2.44:1. White text is more readable. WCAG recommends at least 4.5:1 for body text.