Skip to content

Medium blue

Medium blue is a medium, vivid color from the blue family. Hex code #0000CD.

Medium blue#0000CD

Color codes

  • CSS namemediumblue
  • HEX#0000CD
  • RGBrgb(0 0 205)
  • HSLhsl(240 100% 40%)
  • HSB / HSVhsb(240, 100%, 80%)
  • OKLCHoklch(38.3% 0.266 264.1)
  • CMYKcmyk(100%, 100%, 0%, 20%)

White text

11.16:1 · passes WCAG AAA

Black text

1.88:1 · fails WCAG

Shades

50#ECF2FE
100#C1D5FE
200#97B8FB
300#6A98FD
400#4478F4
500#0F4BFC
600#0332CF
700#0015A4
800#000073

Complementary

#0000CD
#563F06

Analogous

#0000CD
#0B4965
#4F159D

Triadic

#0000CD
#7E121A
#0D5214

About this color

Medium blue in CSS and design

Medium blue is a medium, vivid color from the blue family. Medium blue is one of the extended color keywords, which CSS adopted from the X11 color names used on Unix workstations.

Use it in CSS by name or by any of its codes; these all give the same color:

color: mediumblue;
color: #0000CD;
color: rgb(0 0 205);
color: hsl(240 100% 40%);

For text on medium blue, white reads best. Check other combinations with the contrast checker, or browse all CSS color names.

Frequently asked questions

What is the hex code for medium blue?

#0000CD. In CSS you can also use the keyword mediumblue, which works in every browser.

What is medium blue in RGB and HSL?

In RGB it is rgb(0 0 205), in HSL hsl(240 100% 40%). For print, cmyk(100%, 100%, 0%, 20%) is a starting point, but CMYK depends on paper and ink, so check with your printer.

Should I use black or white text on medium blue?

White text works better: it has a contrast ratio of 11.16:1 and passes WCAG AAA. Black text reaches 1.88:1.

Which colors go with medium blue?

Its complementary color is #563F06, on the opposite side of the color wheel. For a calmer look, combine it with its analogous neighbors #0B4965 and #4F159D. The palette generator builds more combinations.