HEX to HSL: #1E3A8A
Also known as: Tailwind v3 blue-900
Result
#1E3A8A → hsl(224 64% 33%)
Values are shown at full precision, so converting back gives exactly #1e3a8a. 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. RGB ÷ 255
R = 0.1176 G = 0.2275 B = 0.5412
2. max, min, Δ
max = 0.5412 min = 0.1176 Δ = max − min = 0.4235
3. L
L = (max + min) / 2 = 0.3294 = 32.94%
4. S
S = Δ / (1 − |2L − 1|) = 0.6429 = 64.29%
5. H
max is B → H = 60° × ((R − G) / Δ + 4) = 60° × ((0.1176 − 0.2275) / 0.4235 + 4) = 224.44°
6. HSL
hsl(224.44 64.29% 32.94%)
All formats
- HEX
- #1e3a8a
- RGB
- rgb(30 58 138)
- RGB (legacy)
- rgb(30, 58, 138)
- HSL
- hsl(224.44 64.29% 32.94%) → hsl(224 64% 33%)
- HWB
- hwb(224 12% 46%)
- OKLCH
- oklch(0.379 0.138 265.5) · oklch(37.9% 0.138 265.5)
- OKLab
- oklab(0.379 -0.011 -0.137)
- Lab (D50)
- lab(26.34 13.76 -48.67)
- LCH (D50)
- lch(26.34 50.58 285.79)
- Display P3
- color(display-p3 0.1437 0.2247 0.5217)
- Linear sRGB
- color(srgb-linear 0.0130 0.0423 0.2542)
Gamut: sRGB and Display P3
#1E3A8A is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.259 and Display P3 reaches 0.259; this color uses 53% of the sRGB chroma available.
CSS snippets
.element {
color: #1e3a8a;
color: rgb(30 58 138);
color: hsl(224 64% 33%);
color: oklch(0.379 0.138 265.5);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.379 0.138 265.5);
}
/* arbitrary values */
class="text-[#1e3a8a] bg-[oklch(0.379_0.138_265.5)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.1437 0.2247 0.5217); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #1e3a8a calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- blue-900#1C398E
- v3 indigo-900#312E81
- indigo-900#312C85
- v3 indigo-800#3730A3
- darkslateblue#483D8B
- v3 blue-800#1E40AF
- sky-900#024A70
- indigo-800#372AAC
Lighter and darker, same hue and chroma
- #2D4C9D · oklch(0.439 0.138 265.5) · ΔL +0.06
- #102877 · oklch(0.319 0.138 265.5) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?