HEX to OKLCH: #155DFC
Also known as: Tailwind blue-600
Result
#155DFC → oklch(0.547 0.246 262.9)
Values are shown at full precision, so converting back gives exactly #155dfc. 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: 21/255 = 0.08235 → 0.007499 (((x + 0.055) / 1.055)^2.4) G: 93/255 = 0.36471 → 0.109462 (((x + 0.055) / 1.055)^2.4) B: 252/255 = 0.98824 → 0.973445 (((x + 0.055) / 1.055)^2.4)
2. linear sRGB → LMS
l = 0.4122·R + 0.5363·G + 0.0514·B = 0.111879 m = 0.2119·R + 0.6807·G + 0.1074·B = 0.180645 s = 0.0883·R + 0.2817·G + 0.6300·B = 0.644749
3. cube root
l′ = ∛0.111879 = 0.481855 m′ = ∛0.180645 = 0.565295 s′ = ∛0.644749 = 0.863900
4. LMS′ → Oklab
L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.54652 a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = -0.03049 b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = -0.24364
5. Oklab → OKLCH
C = √(a² + b²) = 0.24554 H = atan2(b, a) = 262.866° L = 0.54652
6. OKLCH
oklch(0.54652 0.24554 262.866) rounded: oklch(0.547 0.246 262.9)
All formats
- HEX
- #155dfc
- RGB
- rgb(21 93 252)
- RGB (legacy)
- rgb(21, 93, 252)
- HSL
- hsl(221.30 97.47% 53.53%) → hsl(221 97% 54%)
- HWB
- hwb(221 8% 1%)
- OKLCH
- oklch(0.547 0.246 262.9) · oklch(54.7% 0.246 262.9)
- OKLab
- oklab(0.547 -0.030 -0.244)
- Lab (D50)
- lab(44.11 29.12 -86.22)
- LCH (D50)
- lch(44.11 91.01 288.66)
- Display P3
- color(display-p3 0.1741 0.3592 0.9521)
- Linear sRGB
- color(srgb-linear 0.0075 0.1095 0.9734)
Gamut: sRGB and Display P3
#155DFC is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.251 and Display P3 reaches 0.269; this color uses 98% of the sRGB chroma available.
CSS snippets
.element {
color: #155dfc;
color: rgb(21 93 252);
color: hsl(221 97% 54%);
color: oklch(0.547 0.246 262.9);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.547 0.246 262.9);
}
/* arbitrary values */
class="text-[#155dfc] bg-[oklch(0.547_0.246_262.9)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.1741 0.3592 0.9521); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #155dfc calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- v3 blue-600#2563EB
- blue-700#1447E6
- royalblue#4169E1
- v3 blue-700#1D4ED8
- v3 indigo-600#4F46E5
- indigo-500#615FFF
- indigo-600#4F39F6
- v3 indigo-500#6366F1
Lighter and darker, same hue and chroma
- #2972FF · oklch(0.607 0.246 262.9) · ΔL +0.06
- #0048E7 · oklch(0.487 0.246 262.9) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?