CSS named color

MediumBlue #0000CD

mediumblue rgb(0, 0, 205)

MediumBlue is a vivid blue with the hex code #0000CD, which converts to rgb(0, 0, 205). Open #0000CD in the converter to tweak it.

MediumBlue color values

HEX#0000CD
HEX (shorthand)—
RGBrgb(0, 0, 205)
RGBArgba(0, 0, 205, 1)
8-digit HEX#0000CDFF
HSLhsl(240, 100%, 40%)
HSV / HSB240°, 100%, 80%
CMYK100%, 100%, 0%, 20%
RGB 0–10, 0, 0.804
Decimal205
CSS keywordmediumblue

How #0000CD converts to RGB

Split the hex code into three pairs and read each pair as a base-16 number: 00 → 0, 00 → 0, CD → 205. That gives rgb(0, 0, 205). The step-by-step guide explains the math.

Shades of MediumBlue

Mixed toward black in 10% steps. Click a swatch to copy its hex.

Tints of MediumBlue

Mixed toward white in 10% steps.

Color harmonies

Hue rotations of MediumBlue on the HSL color wheel, keeping saturation and lightness fixed. The color harmony guide explains when each scheme works.

Complementary

Analogous

Split-complementary

Triadic

Tetradic (square)

Contrast and accessibility

TextBackgroundRatioWCAG 2.x
White MediumBlue 11.16:1AAA
Black MediumBlue 1.88:1Fail

Use white text on a mediumblue background. Test any other pair in the contrast checker; thresholds are explained in the WCAG contrast guide.

Use MediumBlue in CSS

.element {
  color: mediumblue;                         /* keyword */
  background-color: #0000CD;            /* hex */
  border-color: rgb(0 0 205 / 50%);    /* 50% transparent */
}

Need it semi-transparent? Append an alpha byte: #0000CD80 is MediumBlue at 50% opacity. See RGBA & transparency.

Similar named colors

FAQ

What is the HEX code for MediumBlue?

The CSS named color mediumblue is #0000CD in hexadecimal. In CSS you can write color: mediumblue; or color: #0000CD; — both produce the same pixel.

What is MediumBlue in RGB?

MediumBlue is rgb(0, 0, 205): red 0, green 0, blue 205 on the 0–255 scale. As normalized 0–1 floats that is (0, 0, 0.804).

Is white or black text more readable on MediumBlue?

White text is more readable. White on #0000CD has a contrast ratio of 11.16:1 (AAA), black on #0000CD has 1.88:1 (Fail). WCAG AA needs 4.5:1 for normal text.

Copied!