HEX to RGB: #00008B
Also known as: CSS darkblue
Result
#00008B → rgb(0 0 139)
Values are shown at full precision, so converting back gives exactly #00008b. The rounded form is what you normally paste into CSS.
Step-by-step math
Every number below is computed from the input, nothing is looked up.
1. HEX → pairs
#00008B → 00 | 00 | 8B
2. base 16 → base 10
R = 00₁₆ = 0×16 + 0 = 0 G = 00₁₆ = 0×16 + 0 = 0 B = 8B₁₆ = 8×16 + 11 = 139
3. RGB
rgb(0 0 139)
All formats
- HEX
- #00008b
- RGB
- rgb(0 0 139)
- RGB (legacy)
- rgb(0, 0, 139)
- HSL
- hsl(240.00 100.00% 27.25%) → hsl(240 100% 27%)
- HWB
- hwb(240 0% 45%)
- OKLCH
- oklch(0.288 0.199 264.1) · oklch(28.8% 0.199 264.1)
- OKLab
- oklab(0.288 -0.021 -0.198)
- Lab (D50)
- lab(13.02 43.48 -71.34)
- LCH (D50)
- lch(13.02 83.54 301.36)
- Display P3
- color(display-p3 0.0000 0.0000 0.5221)
- Linear sRGB
- color(srgb-linear 0.0000 0.0000 0.2582)
Gamut: sRGB and Display P3
#00008B is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.169 and Display P3 reaches 0.199; this color uses 100% of the sRGB chroma available.
CSS snippets
.element {
color: #00008b;
color: rgb(0 0 139);
color: hsl(240 100% 27%);
color: oklch(0.288 0.199 264.1);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.288 0.199 264.1);
}
/* arbitrary values */
class="text-[#00008b] bg-[oklch(0.288_0.199_264.1)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.0000 0.0000 0.5221); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #00008b calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- navy#000080
- midnightblue#191970
- violet-950#2F0D68
- indigo-900#312C85
- v3 violet-950#2E1065
- v3 indigo-900#312E81
- blue-900#1C398E
- blue-950#162456
Lighter and darker, same hue and chroma
- #01219F · oklch(0.348 0.199 264.1) · ΔL +0.06
- #060077 · oklch(0.228 0.199 264.1) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?