Notification
Go to Home All Tools Compare Glossary Blog Contact

Blue Color Code: HEX, RGB, HSL and CMYK

Blue is #0000ff in hex, rgb(0, 0, 255) in RGB and hsl(240, 100%, 50%) in HSL. Copy any format, check contrast and see shades and matching colours.

Client-Side (Private)
HEX #0000ff
RGB rgb(0, 0, 255)
HSL hsl(240, 100%, 50%)
HSV hsv(240, 100%, 100%)
CMYK cmyk(100%, 100%, 0%, 0%)
Contrast on white 8.59:1
Live Preview
#0000ff Blue
e.g. blue
Quick try:
Converted Result (ALL)

How to use blue in CSS

Step-by-step mathematical method you can verify by hand

  1. Use the colour name: color: blue; or background: blue;
  2. Or use the hex code: color: #0000ff;
  3. Or use RGB: color: rgb(0, 0, 255); and add transparency with rgba or rgb(... / 50%).
  4. Or use HSL to adjust it: hsl(240, 100%, 50%). Raise the last number to lighten, lower it to darken.

Blue in every format

Worked Hand Example
FormatValue
HEX#0000ff
RGBrgb(0, 0, 255)
HSLhsl(240, 100%, 50%)
HSVhsv(240, 100%, 100%)
CMYKcmyk(100%, 100%, 0%, 0%)
Decimal255
blue = #0000ff.

Shades and tints of blue

The hue and saturation of blue stay the same and only the HSL lightness changes, so every row is the same colour family.

ShadeHEXHSL lightness
Lightest #ccccff 90%
Lighter #8080ff 75%
Light #3333ff 60%
Blue #0000ff 50%
Dark #0000cc 40%
Darker #000080 25%
Darkest #00003d 12%

Colours that go with blue

Colour-wheel harmonies calculated by rotating the hue.

HarmonyHEXRGB
Complementary #ffff00 rgb(255, 255, 0)
Analogous (+30°) #8000ff rgb(128, 0, 255)
Analogous (−30°) #0080ff rgb(0, 128, 255)
Triadic (+120°) #ff0000 rgb(255, 0, 0)
Triadic (+240°) #00ff00 rgb(0, 255, 0)
Split-complementary (+150°) #ff8000 rgb(255, 128, 0)
Split-complementary (+210°) #80ff00 rgb(128, 255, 0)

Contrast of blue with black and white text

WCAG 2.x contrast ratios.

Text colourRatioAA normal (4.5)AA large (3)
White 8.59:1 Pass Pass
Black 2.44:1 Fail Fail

More colour codes

Quickly jump to other conversions and color systems

Education

About this converter

01

Exact and Explained

Blue is #0000ff in hex, rgb(0, 0, 255) in RGB and hsl(240, 100%, 50%) in HSL. Copy any format, check contrast and see shades and matching colours. The worked example and tables on this page are calculated from the numbers themselves, so you can check the result by hand.

02

Privacy

The conversion runs in your browser. Nothing you type is sent to a server.

Good to know

Questions, answered

Quick answers about how this tool works.

blue is #0000ff in hex, rgb(0, 0, 255) in RGB and hsl(240, 100%, 50%) in HSL.

blue is rgb(0, 0, 255). In the simple CMYK formula it is cmyk(100%, 100%, 0%, 0%) (a screen conversion, not a print profile).

Yes. You can write color: blue; in CSS and it means exactly #0000ff.

Black text has a contrast ratio of 2.44:1 and white text 8.59:1 on this colour. White is the better choice. WCAG AA needs 4.5:1 for normal text.

Was this tool helpful?

★ 5.0 • 2 user ratings

Tap a star to rate instantly

What do you need to work out next?

Search 278+ free tools by name, or pick a category below. Every one runs instantly in your browser — no signup, nothing to install.

More Developer Tools
AI ADVISOR & COACH

Ask AI Advisor

Ask AI