Medium blue color (#0000CD)
#0000CD (Medium blue) is a vivid blue colour. It is rgb(0, 0, 205) in RGB and hsl(240, 100%, 40%) in HSL. Text in white reads better on it: the contrast is 11.16:1 against white and 1.88:1 against black.
How to work it out
- 1
A hex code is three pairs of base-16 digits: red, green and blue, from 00 (none) to FF (full).
\mathrm{#0000CD}:\quad R=\mathrm{00}_{16}=0,\ G=\mathrm{00}_{16}=0,\ B=\mathrm{CD}_{16}=205 - 2
HSL describes the same colour as a hue angle on the colour wheel (0° red, 120° green, 240° blue), a saturation and a lightness.
- 3
The complementary colour sits opposite on the wheel: add 180° to the hue.
240^\circ + 180^\circ = 60^\circ ;\Rightarrow; \mathrm{#CDCD00} - 4
Contrast is the ratio of the lighter to the darker relative luminance, each plus 0.05. WCAG asks for at least 4.5:1 for normal text and 3:1 for large text (AA).
LaTeX source of the formulas on this page
\[ \mathrm{#0000CD} = \mathrm{rgb}(0, 0, 205) \]
\[ \mathrm{#0000CD}:\quad R=\mathrm{00}_{16}=0,\ G=\mathrm{00}_{16}=0,\ B=\mathrm{CD}_{16}=205 \]
\[ H=240^\circ,\quad S=100\%,\quad L=40\% \]
\[ 240^\circ + 180^\circ = 60^\circ ;\Rightarrow; \mathrm{#CDCD00} \]
\[ \text{contrast} = \frac{L_1+0.05}{L_2+0.05} = 11.16:1\ \text{(on white)} \]Medium blue in every colour format
| Format | Value |
|---|---|
| HEX | #0000CD |
| RGB | rgb(0, 0, 205) |
| RGB (percent) | rgb(0.0%, 0.0%, 80.4%) |
| HSL | hsl(240, 100%, 40%) |
| HSV / HSB | hsv(240, 100%, 80%) |
| CMYK | cmyk(100%, 100%, 0%, 20%) |
| Decimal | 205 |
| Description | vivid blue |
| CSS name | mediumblue |
Text contrast (WCAG)
| Background of this colour with… | Contrast | AA normal (4.5) | AA large (3) | AAA normal (7) | AAA large (4.5) |
|---|---|---|---|---|---|
| White text | 11.16:1 | pass | pass | pass | pass |
| Black text | 1.88:1 | fail | fail | fail | fail |
Shades and tints
| Kind | Hex codes (darkest to lightest) |
|---|---|
| Shades (mixed with black) | #000022 #000044 #000067 #000089 #0000AB |
| This colour | #0000CD |
| Tints (mixed with white) | #2B2BD5 #5555DE #8080E6 #AAAAEE #D5D5F7 |
How it looks with colour blindness
| Type | Hex | Distance from the original |
|---|---|---|
| Protanopia | #0046D2 | 34 |
| Deuteranopia | #002FCA | 21 |
| Tritanopia | #005577 | 100 |
| Grayscale | #3B3B3B | - |
Nearest named colours
| Name | Hex |
|---|---|
| Blue | #0000FF |
| Blue violet | #8A2BE2 |
| Dark violet | #9400D3 |
| Dark blue | #00008B |
Questions
What is the RGB value of #0000CD?
rgb(0, 0, 205): red 0, green 0, blue 205.
What is the HSL value of #0000CD?
hsl(240, 100%, 40%): a hue of 240°, 100% saturation and 40% lightness.
What is the complementary colour of #0000CD?
#CDCD00, found by turning the hue by 180°. The inverted colour (each channel subtracted from 255) is #FFFF32.
Should I use white or black text on #0000CD?
White. White gives 11.16:1 and black 1.88:1; the better one passes WCAG AA for normal text.
What is the CMYK value of #0000CD?
cmyk(100%, 100%, 0%, 20%). This is a simple formula conversion; printed colours depend on the printer profile.
Is #0000CD a named colour?
Yes: it is the CSS colour name "mediumblue".