OKLCH to HEX: #3B82F6
Also known as: Tailwind v3 blue-500
Result
oklch(0.62308 0.18801 259.815) → #3B82F6
Values are shown at full precision, so converting back gives exactly #3b82f6. 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.62308 0.18801 259.815)
2. OKLCH → Oklab
a = C·cos H = -0.03325 b = C·sin H = -0.18505
3. Oklab → LMS′
l′ = L + 0.3963·a + 0.2158·b = 0.569970 m′ = L − 0.1056·a − 0.0639·b = 0.638405 s′ = L − 0.0895·a − 1.2915·b = 0.865041
4. cube
l = 0.569970³ = 0.185164 m = 0.638405³ = 0.260190 s = 0.865041³ = 0.647306
5. LMS → linear sRGB
R = 4.0767·l − 3.3077·m + 0.2310·s = 0.043740 G = −1.2684·l + 2.6098·m − 0.3413·s = 0.223225 B = −0.0042·l − 0.7034·m + 1.7076·s = 0.921551
6. linear → sRGB, × 255
R = 0.23139 × 255 = 59.00 → 59 G = 0.50980 × 255 = 130.00 → 130 B = 0.96469 × 255 = 246.00 → 246
7. RGB → HEX
#3B82F6
All formats
- HEX
- #3b82f6
- RGB
- rgb(59 130 246)
- RGB (legacy)
- rgb(59, 130, 246)
- HSL
- hsl(217.22 91.22% 59.80%) → hsl(217 91% 60%)
- HWB
- hwb(217 23% 4%)
- OKLCH
- oklch(0.623 0.188 259.8) · oklch(62.3% 0.188 259.8)
- OKLab
- oklab(0.623 -0.033 -0.185)
- Lab (D50)
- lab(54.62 8.76 -65.79)
- LCH (D50)
- lch(54.62 66.37 277.59)
- Display P3
- color(display-p3 0.3047 0.5035 0.9338)
- Linear sRGB
- color(srgb-linear 0.0437 0.2232 0.9216)
Gamut: sRGB and Display P3
#3B82F6 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.204 and Display P3 reaches 0.219; this color uses 92% of the sRGB chroma available.
CSS snippets
.element {
color: #3b82f6;
color: rgb(59 130 246);
color: hsl(217 91% 60%);
color: oklch(0.623 0.188 259.8);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.623 0.188 259.8);
}
/* arbitrary values */
class="text-[#3b82f6] bg-[oklch(0.623_0.188_259.8)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.3047 0.5035 0.9338); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #3b82f6 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- blue-500#2B7FFF
- dodgerblue#1E90FF
- sky-600#0084D1
- royalblue#4169E1
- cornflowerblue#6495ED
- v3 indigo-500#6366F1
- indigo-400#7C86FF
- v3 sky-600#0284C7
Lighter and darker, same hue and chroma
- #4E95FF · oklch(0.683 0.188 259.8) · ΔL +0.06
- #286FE1 · oklch(0.563 0.188 259.8) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?