HSL to HEX: #00008B
Also known as: CSS darkblue
Result
hsl(240.00 100.00% 27.25%) → #00008B
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. input
H = 240.00°, S = 100.00%, L = 27.25%
2. C
C = (1 − |2L − 1|) × S = 0.54500
3. X
X = C × (1 − |(H / 60°) mod 2 − 1|) = 0.00000 (H / 60° = 4.0000, sector 4)
4. m
m = L − C / 2 = 0.00000
5. (R′, G′, B′) + m
(R′, G′, B′) = (0.00000, 0.00000, 0.54500) R = round((0.00000 + 0.00000) × 255) = 0 G = round((0.00000 + 0.00000) × 255) = 0 B = round((0.54500 + 0.00000) × 255) = 139
6. RGB → HEX
#00008B
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?