OKLCH to HEX: #51A2FF
Also known as: Tailwind blue-400
Result
oklch(0.70400 0.15827 253.627) → #51A2FF
Values are shown at full precision, so converting back gives exactly #51a2ff. 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.70400 0.15827 253.627)
2. OKLCH → Oklab
a = C·cos H = -0.04461 b = C·sin H = -0.15185
3. Oklab → LMS′
l′ = L + 0.3963·a + 0.2158·b = 0.653547 m′ = L − 0.1056·a − 0.0639·b = 0.718406 s′ = L − 0.0895·a − 1.2915·b = 0.904107
4. cube
l = 0.653547³ = 0.279146 m = 0.718406³ = 0.370774 s = 0.904107³ = 0.739024
5. LMS → linear sRGB
R = 4.0767·l − 3.3077·m + 0.2310·s = 0.082283 G = −1.2684·l + 2.6098·m − 0.3413·s = 0.361309 B = −0.0042·l − 0.7034·m + 1.7076·s = 0.999988
6. linear → sRGB, × 255
R = 0.31765 × 255 = 81.00 → 81 G = 0.63530 × 255 = 162.00 → 162 B = 0.99999 × 255 = 255.00 → 255
7. RGB → HEX
#51A2FF
All formats
- HEX
- #51a2ff
- RGB
- rgb(81 162 255)
- RGB (legacy)
- rgb(81, 162, 255)
- HSL
- hsl(212.07 100.00% 65.88%) → hsl(212 100% 66%)
- HWB
- hwb(212 32% 0%)
- OKLCH
- oklch(0.704 0.158 253.6) · oklch(70.4% 0.158 253.6)
- OKLab
- oklab(0.704 -0.045 -0.152)
- Lab (D50)
- lab(64.80 -2.79 -54.46)
- LCH (D50)
- lch(64.80 54.53 267.07)
- Display P3
- color(display-p3 0.3985 0.6279 0.9723)
- Linear sRGB
- color(srgb-linear 0.0823 0.3613 1.0000)
Gamut: sRGB and Display P3
#51A2FF is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.158 and Display P3 reaches 0.171; this color uses 100% of the sRGB chroma available.
CSS snippets
.element {
color: #51a2ff;
color: rgb(81 162 255);
color: hsl(212 100% 66%);
color: oklch(0.704 0.158 253.6);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.704 0.158 253.6);
}
/* arbitrary values */
class="text-[#51a2ff] bg-[oklch(0.704_0.158_253.6)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.3985 0.6279 0.9723); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #51a2ff calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- v3 blue-400#60A5FA
- sky-500#00A6F4
- cornflowerblue#6495ED
- v3 sky-500#0EA5E9
- dodgerblue#1E90FF
- v3 indigo-400#818CF8
- sky-400#00BCFF
- v3 sky-400#38BDF8
Lighter and darker, same hue and chroma
- #64B5FF · oklch(0.764 0.158 253.6) · ΔL +0.06
- #3D8FEA · oklch(0.644 0.158 253.6) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?