HEX to OKLCH: #C4B5FD
Also known as: Tailwind v3 violet-300
Result
#C4B5FD → oklch(0.811 0.101 293.6)
Values are shown at full precision, so converting back gives exactly #c4b5fd. 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: 196/255 = 0.76863 → 0.552011 (((x + 0.055) / 1.055)^2.4) G: 181/255 = 0.70980 → 0.462077 (((x + 0.055) / 1.055)^2.4) B: 253/255 = 0.99216 → 0.982251 (((x + 0.055) / 1.055)^2.4)
2. linear sRGB → LMS
l = 0.4122·R + 0.5363·G + 0.0514·B = 0.525911 m = 0.2119·R + 0.6807·G + 0.1074·B = 0.536999 s = 0.0883·R + 0.2817·G + 0.6300·B = 0.797717
3. cube root
l′ = ∛0.525911 = 0.807181 m′ = ∛0.536999 = 0.812814 s′ = ∛0.797717 = 0.927434
4. LMS′ → Oklab
L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.81116 a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = 0.04050 b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = -0.09284
5. Oklab → OKLCH
C = √(a² + b²) = 0.10129 H = atan2(b, a) = 293.571° L = 0.81116
6. OKLCH
oklch(0.81116 0.10129 293.571) rounded: oklch(0.811 0.101 293.6)
All formats
- HEX
- #c4b5fd
- RGB
- rgb(196 181 253)
- RGB (legacy)
- rgb(196, 181, 253)
- HSL
- hsl(252.50 94.74% 85.10%) → hsl(253 95% 85%)
- HWB
- hwb(252 71% 1%)
- OKLCH
- oklch(0.811 0.101 293.6) · oklch(81.1% 0.101 293.6)
- OKLab
- oklab(0.811 0.041 -0.093)
- Lab (D50)
- lab(76.90 16.54 -33.91)
- LCH (D50)
- lch(76.90 37.73 296.00)
- Display P3
- color(display-p3 0.7586 0.7119 0.9719)
- Linear sRGB
- color(srgb-linear 0.5520 0.4621 0.9823)
Gamut: sRGB and Display P3
#C4B5FD is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.105 and Display P3 reaches 0.115; this color uses 97% of the sRGB chroma available.
CSS snippets
.element {
color: #c4b5fd;
color: rgb(196 181 253);
color: hsl(253 95% 85%);
color: oklch(0.811 0.101 293.6);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.811 0.101 293.6);
}
/* arbitrary values */
class="text-[#c4b5fd] bg-[oklch(0.811_0.101_293.6)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.7586 0.7119 0.9719); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #c4b5fd calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- violet-300#C4B4FF
- v3 purple-300#D8B4FE
- purple-300#DAB2FF
- v3 indigo-300#A5B4FC
- indigo-300#A3B3FF
- plum#DDA0DD
- v3 fuchsia-300#F0ABFC
- v3 blue-300#93C5FD
Lighter and darker, same hue and chroma
- #D7C8FF · oklch(0.871 0.101 293.6) · ΔL +0.06
- #B1A2E9 · oklch(0.751 0.101 293.6) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?