HEX to OKLCH: #162456
Also known as: Tailwind blue-950
Result
#162456 → oklch(0.281 0.092 268.1)
Values are shown at full precision, so converting back gives exactly #162456. 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: 22/255 = 0.08627 → 0.008023 (((x + 0.055) / 1.055)^2.4) G: 36/255 = 0.14118 → 0.017642 (((x + 0.055) / 1.055)^2.4) B: 86/255 = 0.33725 → 0.093059 (((x + 0.055) / 1.055)^2.4)
2. linear sRGB → LMS
l = 0.4122·R + 0.5363·G + 0.0514·B = 0.017557 m = 0.2119·R + 0.6807·G + 0.1074·B = 0.023703 s = 0.0883·R + 0.2817·G + 0.6300·B = 0.064304
3. cube root
l′ = ∛0.017557 = 0.259905 m′ = ∛0.023703 = 0.287256 s′ = ∛0.064304 = 0.400632
4. LMS′ → Oklab
L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.28104 a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = -0.00301 b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = -0.09239
5. Oklab → OKLCH
C = √(a² + b²) = 0.09244 H = atan2(b, a) = 268.132° L = 0.28104
6. OKLCH
oklch(0.28104 0.09244 268.132) rounded: oklch(0.281 0.092 268.1)
All formats
- HEX
- #162456
- RGB
- rgb(22 36 86)
- RGB (legacy)
- rgb(22, 36, 86)
- HSL
- hsl(226.88 59.26% 21.18%) → hsl(227 59% 21%)
- HWB
- hwb(227 9% 66%)
- OKLCH
- oklch(0.281 0.092 268.1) · oklch(28.1% 0.092 268.1)
- OKLab
- oklab(0.281 -0.003 -0.092)
- Lab (D50)
- lab(15.53 9.30 -32.80)
- LCH (D50)
- lch(15.53 34.09 285.83)
- Display P3
- color(display-p3 0.0981 0.1397 0.3248)
- Linear sRGB
- color(srgb-linear 0.0080 0.0176 0.0931)
Gamut: sRGB and Display P3
#162456 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.187 and Display P3 reaches 0.188; this color uses 49% of the sRGB chroma available.
CSS snippets
.element {
color: #162456;
color: rgb(22 36 86);
color: hsl(227 59% 21%);
color: oklch(0.281 0.092 268.1);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.281 0.092 268.1);
}
/* arbitrary values */
class="text-[#162456] bg-[oklch(0.281_0.092_268.1)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.0981 0.1397 0.3248); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #162456 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- v3 blue-950#172554
- v3 indigo-950#1E1B4B
- indigo-950#1E1A4D
- sky-950#052F4A
- v3 sky-950#082F49
- slate-800#1D293D
- midnightblue#191970
- v3 slate-800#1E293B
Lighter and darker, same hue and chroma
- #243468 · oklch(0.341 0.092 268.1) · ΔL +0.06
- #091445 · oklch(0.221 0.092 268.1) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?