CSS named color
DarkBlue #00008B
DarkBlue (CSS keyword darkblue) has the hex code #00008B and the RGB value rgb(0, 0, 139): a very dark, vivid blue.
Dark blue (#00008b) uses 139 as its blue channel, the value the X11 list uses for many of its "dark" variants. It is slightly brighter than navy (#000080).
Color codes for DarkBlue
| CSS keyword | darkblue |
|---|---|
| HEX | #00008B |
| RGB | rgb(0, 0, 139) |
| HSL | hsl(240, 100%, 27%) |
| HWB | hwb(240 0% 45%) |
| OKLCH | oklch(28.8% 0.199 264.1) |
| CMYK (naive, no ICC profile) | cmyk(100%, 100%, 0%, 45%) |
| Decimal | 139 |
| Hue family | Blues |
Contrast and accessibility
On darkblue, white text has a contrast ratio of 15.29:1 and passes AAA at any text size; black text reaches 1.37: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 darkblue | 1.37:1 | Fail | Fail | Fail | Fail | 0.0 |
| White text on darkblue | 15.29:1 | Pass | Pass | Pass | Pass | −103.1 |
| Darkblue text on white | 15.29:1 | Pass | Pass | Pass | Pass | 100.0 |
| Darkblue text on black | 1.37:1 | Fail | Fail | Fail | Fail | 0.0 |
Tints and shades
Each step mixes darkblue with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, darkblue, white 25%) in CSS.
Tints (mixed with white)
- 5%
#0d0d91 - 15%
#26269c - 25%
#4040a8 - 35%
#5959b4 - 45%
#7373bf - 55%
#8c8ccb - 65%
#a6a6d6 - 75%
#bfbfe2 - 85%
#d9d9ee - 95%
#f2f2f9
Shades (mixed with black)
- 5%
#000084 - 15%
#000076 - 25%
#000068 - 35%
#00005a - 45%
#00004c - 55%
#00003f - 65%
#000031 - 75%
#000023 - 85%
#000015 - 95%
#000007
Color harmonies
Rotating the hue in OKLCH while keeping lightness and chroma, darkblue's complementary color is #3D2600 (close to darkslategray), its analogous colors are #00304E and #370079, and its triadic partners are #5D0002 and #003800. For text on top, white gives the higher contrast.
| Harmony | Rotation | Color |
|---|---|---|
| Complementary | +180° | #3d2600 |
| Analogous | −30°, +30° | #00304e#370079 |
| Triadic | +120°, +240° | #5d0002#003800 |
| Split-complementary | +150°, +210° | #4c1800#2b2e00 |
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?
DarkBlue 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
| Color | HEX | ΔE OK |
|---|---|---|
| navy | #000080 | 2.0 |
| midnightblue | #191970 | 6.1 |
| mediumblue | #0000cd | 11.6 |
Nearest Tailwind v4 colors
| Color | HEX | ΔE OK |
|---|---|---|
| violet-950 | #2f0d68 | 9.8 |
| indigo-900 | #312c85 | 10.0 |
| blue-900 | #1c398e | 10.6 |
Code snippets
.element {
color: darkblue;
background-color: #00008b;
border-color: rgb(0 0 139);
outline-color: oklch(28.8% 0.199 264.1);
}<div class="bg-[#00008b] text-white">...</div>
/* or register it once in your CSS (Tailwind v4) */
@theme {
--color-darkblue: #00008b;
}
/* then use bg-darkblue, text-darkblue, border-darkblue */import SwiftUI
extension Color {
static let darkblue = Color(red: 0.000, green: 0.000, blue: 0.545)
}import androidx.compose.ui.graphics.Color
val Darkblue = Color(0xFF00008B)import 'package:flutter/material.dart';
const darkblue = Color(0xFF00008B);<!-- res/values/colors.xml -->
<color name="darkblue">#00008B</color>Frequently asked questions
- What is the hex code for darkblue?
- The hex code for darkblue is #00008B. The same color is rgb(0, 0, 139), hsl(240, 100%, 27%) and oklch(28.8% 0.199 264.1), and in CSS you can also write the keyword darkblue directly.
- Is darkblue a warm or cool color?
- DarkBlue 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 darkblue?
- Rotating the hue in OKLCH while keeping lightness and chroma, darkblue's complementary color is #3D2600 (close to darkslategray), its analogous colors are #00304E and #370079, and its triadic partners are #5D0002 and #003800. For text on top, white gives the higher contrast.
- Can you use white text on darkblue?
- White text on darkblue has a contrast ratio of 15.29:1, which passes both AA and AAA under WCAG 2.2. Black text reaches 1.37:1 and fails AA even for large text. In APCA terms that is Lc −103.1 for white and Lc 0.0 for black.
- What is the RGB value of darkblue?
- DarkBlue is rgb(0, 0, 139): red 0, green 0 and blue 139 on the 0 to 255 scale, or 0.0%, 0.0% and 54.5%. As a decimal integer it is 139.
Last reviewed by Arielton Oberek.