HEX to OKLCH: #2563EB
Also known as: Tailwind v3 blue-600
Result
#2563EB → oklch(0.546 0.215 262.9)
Values are shown at full precision, so converting back gives exactly #2563eb. 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: 37/255 = 0.14510 → 0.018500 (((x + 0.055) / 1.055)^2.4) G: 99/255 = 0.38824 → 0.124772 (((x + 0.055) / 1.055)^2.4) B: 235/255 = 0.92157 → 0.830770 (((x + 0.055) / 1.055)^2.4)
2. linear sRGB → LMS
l = 0.4122·R + 0.5363·G + 0.0514·B = 0.117285 m = 0.2119·R + 0.6807·G + 0.1074·B = 0.178075 s = 0.0883·R + 0.2817·G + 0.6300·B = 0.560152
3. cube root
l′ = ∛0.117285 = 0.489494 m′ = ∛0.178075 = 0.562601 s′ = ∛0.560152 = 0.824331
4. LMS′ → Oklab
L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.54615 a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = -0.02667 b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = -0.21355
5. Oklab → OKLCH
C = √(a² + b²) = 0.21521 H = atan2(b, a) = 262.881° L = 0.54615
6. OKLCH
oklch(0.54615 0.21521 262.881) rounded: oklch(0.546 0.215 262.9)
All formats
- HEX
- #2563eb
- RGB
- rgb(37 99 235)
- RGB (legacy)
- rgb(37, 99, 235)
- HSL
- hsl(221.21 83.19% 53.33%) → hsl(221 83% 53%)
- HWB
- hwb(221 15% 8%)
- OKLCH
- oklch(0.546 0.215 262.9) · oklch(54.6% 0.215 262.9)
- OKLab
- oklab(0.546 -0.027 -0.214)
- Lab (D50)
- lab(44.79 21.05 -75.60)
- LCH (D50)
- lch(44.79 78.47 285.56)
- Display P3
- color(display-p3 0.2132 0.3830 0.8890)
- Linear sRGB
- color(srgb-linear 0.0185 0.1248 0.8308)
Gamut: sRGB and Display P3
#2563EB 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 86% of the sRGB chroma available.
CSS snippets
.element {
color: #2563eb;
color: rgb(37 99 235);
color: hsl(221 83% 53%);
color: oklch(0.546 0.215 262.9);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.546 0.215 262.9);
}
/* arbitrary values */
class="text-[#2563eb] bg-[oklch(0.546_0.215_262.9)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.2132 0.3830 0.8890); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #2563eb calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- blue-600#155DFC
- royalblue#4169E1
- v3 blue-700#1D4ED8
- blue-700#1447E6
- v3 indigo-500#6366F1
- v3 indigo-600#4F46E5
- indigo-500#615FFF
- blue-500#2B7FFF
Lighter and darker, same hue and chroma
- #3777FF · oklch(0.606 0.215 262.9) · ΔL +0.06
- #124FD6 · oklch(0.486 0.215 262.9) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?