HEX to OKLCH: #1E1B4B
Also known as: Tailwind v3 indigo-950
Result
#1E1B4B → oklch(0.257 0.086 281.3)
Values are shown at full precision, so converting back gives exactly #1e1b4b. 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. sRGB → linear
R: 30/255 = 0.11765 → 0.012983 (((x + 0.055) / 1.055)^2.4) G: 27/255 = 0.10588 → 0.010960 (((x + 0.055) / 1.055)^2.4) B: 75/255 = 0.29412 → 0.070360 (((x + 0.055) / 1.055)^2.4)
2. linear sRGB → LMS
l = 0.4122·R + 0.5363·G + 0.0514·B = 0.014850 m = 0.2119·R + 0.6807·G + 0.1074·B = 0.017768 s = 0.0883·R + 0.2817·G + 0.6300·B = 0.048559
3. cube root
l′ = ∛0.014850 = 0.245796 m′ = ∛0.017768 = 0.260944 s′ = ∛0.048559 = 0.364831
4. LMS′ → Oklab
L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.25733 a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = 0.01685 b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = -0.08440
5. Oklab → OKLCH
C = √(a² + b²) = 0.08607 H = atan2(b, a) = 281.288° L = 0.25733
6. OKLCH
oklch(0.25733 0.08607 281.288) rounded: oklch(0.257 0.086 281.3)
All formats
- HEX
- #1e1b4b
- RGB
- rgb(30 27 75)
- RGB (legacy)
- rgb(30, 27, 75)
- HSL
- hsl(243.75 47.06% 20.00%) → hsl(244 47% 20%)
- HWB
- hwb(244 11% 71%)
- OKLCH
- oklch(0.257 0.086 281.3) · oklch(25.7% 0.086 281.3)
- OKLab
- oklab(0.257 0.017 -0.084)
- Lab (D50)
- lab(12.62 13.92 -29.99)
- LCH (D50)
- lch(12.62 33.07 294.90)
- Display P3
- color(display-p3 0.1156 0.1063 0.2830)
- Linear sRGB
- color(srgb-linear 0.0130 0.0110 0.0704)
Gamut: sRGB and Display P3
#1E1B4B is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.154 and Display P3 reaches 0.157; this color uses 56% of the sRGB chroma available.
CSS snippets
.element {
color: #1e1b4b;
color: rgb(30 27 75);
color: hsl(244 47% 20%);
color: oklch(0.257 0.086 281.3);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.257 0.086 281.3);
}
/* arbitrary values */
class="text-[#1e1b4b] bg-[oklch(0.257_0.086_281.3)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.1156 0.1063 0.2830); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #1e1b4b calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- indigo-950#1E1A4D
- blue-950#162456
- v3 blue-950#172554
- slate-800#1D293D
- v3 slate-800#1E293B
- v3 violet-950#2E1065
- gray-800#1E2939
- v3 gray-800#1F2937
Lighter and darker, same hue and chroma
- #2C2B5C · oklch(0.317 0.086 281.3) · ΔL +0.06
- #120B3A · oklch(0.197 0.086 281.3) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?