CSS named color
MediumBlue #0000CD
MediumBlue (CSS keyword mediumblue) has the hex code #0000CD and the RGB value rgb(0, 0, 205): a dark, vivid blue.
A deep, saturated blue (#0000cd), between blue and darkblue. It has very high contrast with white, above 10:1.
Color codes for MediumBlue
| CSS keyword | mediumblue |
|---|---|
| HEX | #0000CD |
| RGB | rgb(0, 0, 205) |
| HSL | hsl(240, 100%, 40%) |
| HWB | hwb(240 0% 20%) |
| OKLCH | oklch(38.3% 0.266 264.1) |
| CMYK (naive, no ICC profile) | cmyk(100%, 100%, 0%, 20%) |
| Decimal | 205 |
| Hue family | Blues |
Contrast and accessibility
On mediumblue, white text has a contrast ratio of 11.16:1 and passes AAA at any text size; black text reaches 1.88:1.
WCAG 2.2 contrast ratios (success criteria 1.4.3 and 1.4.6: AA needs 4.5:1 for normal text and 3:1 for large text, AAA needs 7:1 and 4.5:1). APCA Lc is the lightness contrast from the APCA-W3 0.0.98G model proposed for WCAG 3; a higher absolute value is more readable, and Lc 75 is its suggested minimum for body text.
| Pair | Ratio | AA | AA large | AAA | AAA large | APCA Lc |
|---|---|---|---|---|---|---|
| Black text on mediumblue | 1.88:1 | Fail | Fail | Fail | Fail | 11.5 |
| White text on mediumblue | 11.16:1 | Pass | Pass | Pass | Pass | −96.6 |
| Mediumblue text on white | 11.16:1 | Pass | Pass | Pass | Pass | 92.4 |
| Mediumblue text on black | 1.88:1 | Fail | Fail | Fail | Fail | −10.0 |
Tints and shades
Each step mixes mediumblue with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, mediumblue, white 25%) in CSS.
Tints (mixed with white)
- 5%
#0d0dd0 - 15%
#2626d5 - 25%
#4040da - 35%
#5959df - 45%
#7373e4 - 55%
#8c8ce9 - 65%
#a6a6ee - 75%
#bfbff3 - 85%
#d9d9f8 - 95%
#f2f2fd
Shades (mixed with black)
- 5%
#0000c3 - 15%
#0000ae - 25%
#00009a - 35%
#000085 - 45%
#000071 - 55%
#00005c - 65%
#000048 - 75%
#000033 - 85%
#00001f - 95%
#00000a
Color harmonies
Rotating the hue in OKLCH while keeping lightness and chroma, mediumblue's complementary color is #5B3D00 (close to saddlebrown), its analogous colors are #004A72 and #5300AF, and its triadic partners are #890009 and #005500. For text on top, white gives the higher contrast.
| Harmony | Rotation | Color |
|---|---|---|
| Complementary | +180° | #5b3d00 |
| Analogous | −30°, +30° | #004a72#5300af |
| Triadic | +120°, +240° | #890009#005500 |
| Split-complementary | +150°, +210° | #712b00#434800 |
Computed in OKLCH: the hue is rotated by 180° (complementary), ±30° (analogous), ±120° (triadic) and 180° ±30° (split-complementary) while lightness and chroma stay fixed. Results that fall outside sRGB are brought back with the CSS Color 4 gamut mapping algorithm. Because this uses OKLCH, the values differ from tools that rotate hue in HSL, but every color keeps the same perceived lightness.
Warm or cool?
MediumBlue is a cool color: its hue is 240° on the HSL wheel, in the green, blue and violet range that is conventionally called cool.
Nearest named and Tailwind colors
Distance is ΔE OK, the Euclidean distance in OKLab multiplied by 100. Values under about 2 are hard to tell apart side by side.
Nearest CSS named colors
Nearest Tailwind v4 colors
| Color | HEX | ΔE OK |
|---|---|---|
| blue-800 | #193cb8 | 7.8 |
| indigo-800 | #372aac | 8.9 |
| indigo-700 | #432dd7 | 9.7 |
Code snippets
.element {
color: mediumblue;
background-color: #0000cd;
border-color: rgb(0 0 205);
outline-color: oklch(38.3% 0.266 264.1);
}<div class="bg-[#0000cd] text-white">...</div>
/* or register it once in your CSS (Tailwind v4) */
@theme {
--color-mediumblue: #0000cd;
}
/* then use bg-mediumblue, text-mediumblue, border-mediumblue */import SwiftUI
extension Color {
static let mediumblue = Color(red: 0.000, green: 0.000, blue: 0.804)
}import androidx.compose.ui.graphics.Color
val Mediumblue = Color(0xFF0000CD)import 'package:flutter/material.dart';
const mediumblue = Color(0xFF0000CD);<!-- res/values/colors.xml -->
<color name="mediumblue">#0000CD</color>Frequently asked questions
- What is the hex code for mediumblue?
- The hex code for mediumblue is #0000CD. The same color is rgb(0, 0, 205), hsl(240, 100%, 40%) and oklch(38.3% 0.266 264.1), and in CSS you can also write the keyword mediumblue directly.
- Is mediumblue a warm or cool color?
- MediumBlue is a cool color: its hue is 240° on the HSL wheel, in the green, blue and violet range that is conventionally called cool.
- What colors go with mediumblue?
- Rotating the hue in OKLCH while keeping lightness and chroma, mediumblue's complementary color is #5B3D00 (close to saddlebrown), its analogous colors are #004A72 and #5300AF, and its triadic partners are #890009 and #005500. For text on top, white gives the higher contrast.
- Can you use white text on mediumblue?
- White text on mediumblue has a contrast ratio of 11.16:1, which passes both AA and AAA under WCAG 2.2. Black text reaches 1.88:1 and fails AA even for large text. In APCA terms that is Lc −96.6 for white and Lc 11.5 for black.
- What is the RGB value of mediumblue?
- MediumBlue is rgb(0, 0, 205): red 0, green 0 and blue 205 on the 0 to 255 scale, or 0.0%, 0.0% and 80.4%. As a decimal integer it is 205.
Last reviewed by Arielton Oberek.