OKLCH to HEX: #0C4A6E
Also known as: Tailwind v3 sky-900
Result
oklch(0.39123 0.08453 240.876) → #0C4A6E
Values are shown at full precision, so converting back gives exactly #0c4a6e. 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
oklch(0.39123 0.08453 240.876)
2. OKLCH → Oklab
a = C·cos H = -0.04114 b = C·sin H = -0.07384
3. Oklab → LMS′
l′ = L + 0.3963·a + 0.2158·b = 0.358989 m′ = L − 0.1056·a − 0.0639·b = 0.400288 s′ = L − 0.0895·a − 1.2915·b = 0.490278
4. cube
l = 0.358989³ = 0.046264 m = 0.400288³ = 0.064138 s = 0.490278³ = 0.117850
5. LMS → linear sRGB
R = 4.0767·l − 3.3077·m + 0.2310·s = 0.003675 G = −1.2684·l + 2.6098·m − 0.3413·s = 0.068478 B = −0.0042·l − 0.7034·m + 1.7076·s = 0.155931
6. linear → sRGB, × 255
R = 0.04704 × 255 = 11.99 → 12 G = 0.29020 × 255 = 74.00 → 74 B = 0.43138 × 255 = 110.00 → 110
7. RGB → HEX
#0C4A6E
All formats
- HEX
- #0c4a6e
- RGB
- rgb(12 74 110)
- RGB (legacy)
- rgb(12, 74, 110)
- HSL
- hsl(202.04 80.33% 23.92%) → hsl(202 80% 24%)
- HWB
- hwb(202 5% 57%)
- OKLCH
- oklch(0.391 0.085 240.9) · oklch(39.1% 0.085 240.9)
- OKLab
- oklab(0.391 -0.041 -0.074)
- Lab (D50)
- lab(29.25 -8.24 -26.58)
- LCH (D50)
- lch(29.25 27.83 252.77)
- Display P3
- color(display-p3 0.1293 0.2856 0.4196)
- Linear sRGB
- color(srgb-linear 0.0037 0.0685 0.1559)
Gamut: sRGB and Display P3
#0C4A6E is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.091 and Display P3 reaches 0.119; this color uses 93% of the sRGB chroma available.
CSS snippets
.element {
color: #0c4a6e;
color: rgb(12 74 110);
color: hsl(202 80% 24%);
color: oklch(0.391 0.085 240.9);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.391 0.085 240.9);
}
/* arbitrary values */
class="text-[#0c4a6e] bg-[oklch(0.391_0.085_240.9)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.1293 0.2856 0.4196); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #0c4a6e calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- sky-900#024A70
- cyan-900#104E64
- v3 cyan-900#164E63
- slate-700#314158
- v3 slate-700#334155
- v3 sky-800#075985
- gray-700#364153
- sky-800#00598A
Lighter and darker, same hue and chroma
- #225B80 · oklch(0.451 0.085 240.9) · ΔL +0.06
- #003A5C · oklch(0.331 0.085 240.9) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?