Blue — #0000FF
#0000FF is a medium, vivid blue. It is the CSS named color blue.
Color values
| HEX | #0000FF |
| RGB | rgb(0, 0, 255) |
| HSL | hsl(240, 100%, 50%) |
| CMYK | cmyk(100%, 100%, 0%, 0%) |
| Decimal | 255 |
| CSS | color: #0000FF; |
| Android | 0xFF0000FF |
| Swift | UIColor(red: 0.000, green: 0.000, blue: 1.000, alpha: 1) |
Accessibility and contrast
| White text on #0000FF | 8.59:1 — AA pass · AA large pass · AAA pass |
| Black text on #0000FF | 2.44:1 — AA fail · AA large fail · AAA fail |
| Recommended text color | white |
WCAG 2.1 asks for at least 4.5:1 for body text and 3:1 for large text (18 pt, or 14 pt bold).
Tints and shades of #0000FF
Each swatch keeps the hue and saturation of #0000FF and varies only lightness — the quickest way to build a usable scale from a single brand color.
Colors that go with #0000FF
Harmonies generated by rotating the hue on the color wheel while holding saturation and lightness constant.
Using #0000FF in code
/* CSS */
.element { color: #0000FF; background-color: #0000FF; }
.element { color: rgb(0 0 255); }
.element { color: hsl(240 100% 50%); }
/* Tailwind arbitrary value */
<div class="bg-[#0000FF] text-white">
/* SCSS variable */
$brand: #0000FF;
Frequently asked questions
What color is #0000FF?
#0000FF is a medium, vivid blue, which CSS calls blue. Its hue sits at 240° on the color wheel, with 100% saturation and 50% lightness.
What is #0000FF in RGB?
#0000FF converts to rgb(0, 0, 255) — 0 red, 0 green and 255 blue.
What is #0000FF in CMYK?
Approximately cmyk(100%, 100%, 0%, 0%). Print output depends on the ICC profile of the press and paper, so treat this as a starting point rather than an exact match.
Should text on #0000FF be white or black?
White gives the better contrast ratio (8.59:1 versus 2.44:1).
What is the complementary color of #0000FF?
#FFFF00 — the hue directly opposite #0000FF on the color wheel.