OKLCH to HEX: #4169E1
Also known as: CSS royalblue
Result
oklch(0.55985 0.18823 266.400) → #4169E1
Values are shown at full precision, so converting back gives exactly #4169e1. 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.55985 0.18823 266.400)
2. OKLCH → Oklab
a = C·cos H = -0.01182 b = C·sin H = -0.18786
3. Oklab → LMS′
l′ = L + 0.3963·a + 0.2158·b = 0.514625 m′ = L − 0.1056·a − 0.0639·b = 0.573093 s′ = L − 0.0895·a − 1.2915·b = 0.803524
4. cube
l = 0.514625³ = 0.136293 m = 0.573093³ = 0.188224 s = 0.803524³ = 0.518796
5. LMS → linear sRGB
R = 4.0767·l − 3.3077·m + 0.2310·s = 0.052865 G = −1.2684·l + 2.6098·m − 0.3413·s = 0.141266 B = −0.0042·l − 0.7034·m + 1.7076·s = 0.752932
6. linear → sRGB, × 255
R = 0.25491 × 255 = 65.00 → 65 G = 0.41177 × 255 = 105.00 → 105 B = 0.88235 × 255 = 225.00 → 225
7. RGB → HEX
#4169E1
All formats
- HEX
- #4169e1
- RGB
- rgb(65 105 225)
- RGB (legacy)
- rgb(65, 105, 225)
- HSL
- hsl(225.00 72.73% 56.86%) → hsl(225 73% 57%)
- HWB
- hwb(225 25% 12%)
- OKLCH
- oklch(0.560 0.188 266.4) · oklch(56.0% 0.188 266.4)
- OKLab
- oklab(0.560 -0.012 -0.188)
- Lab (D50)
- lab(46.80 17.78 -66.66)
- LCH (D50)
- lch(46.80 68.99 284.94)
- Display P3
- color(display-p3 0.2904 0.4077 0.8525)
- Linear sRGB
- color(srgb-linear 0.0529 0.1413 0.7529)
Gamut: sRGB and Display P3
#4169E1 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.242 and Display P3 reaches 0.259; this color uses 78% of the sRGB chroma available.
CSS snippets
.element {
color: #4169e1;
color: rgb(65 105 225);
color: hsl(225 73% 57%);
color: oklch(0.560 0.188 266.4);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.560 0.188 266.4);
}
/* arbitrary values */
class="text-[#4169e1] bg-[oklch(0.560_0.188_266.4)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.2904 0.4077 0.8525); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #4169e1 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- v3 blue-600#2563EB
- v3 indigo-500#6366F1
- blue-600#155DFC
- indigo-500#615FFF
- slateblue#6A5ACD
- blue-500#2B7FFF
- v3 blue-500#3B82F6
- v3 indigo-600#4F46E5
Lighter and darker, same hue and chroma
- #517CF6 · oklch(0.620 0.188 266.4) · ΔL +0.06
- #3156CC · oklch(0.500 0.188 266.4) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?