HEX to RGB: #D8B4FE
Also known as: Tailwind v3 purple-300
Result
#D8B4FE → rgb(216 180 254)
Values are shown at full precision, so converting back gives exactly #d8b4fe. 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. HEX → pairs
#D8B4FE → D8 | B4 | FE
2. base 16 → base 10
R = D8₁₆ = 13×16 + 8 = 216 G = B4₁₆ = 11×16 + 4 = 180 B = FE₁₆ = 15×16 + 14 = 254
3. RGB
rgb(216 180 254)
All formats
- HEX
- #d8b4fe
- RGB
- rgb(216 180 254)
- RGB (legacy)
- rgb(216, 180, 254)
- HSL
- hsl(269.19 97.37% 85.10%) → hsl(269 97% 85%)
- HWB
- hwb(269 71% 0%)
- OKLCH
- oklch(0.827 0.108 306.4) · oklch(82.7% 0.108 306.4)
- OKLab
- oklab(0.827 0.064 -0.087)
- Lab (D50)
- lab(78.47 23.68 -31.86)
- LCH (D50)
- lch(78.47 39.70 306.62)
- Display P3
- color(display-p3 0.8243 0.7112 0.9764)
- Linear sRGB
- color(srgb-linear 0.6867 0.4564 0.9911)
Gamut: sRGB and Display P3
#D8B4FE is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.110 and Display P3 reaches 0.121; this color uses 98% of the sRGB chroma available.
CSS snippets
.element {
color: #d8b4fe;
color: rgb(216 180 254);
color: hsl(269 97% 85%);
color: oklch(0.827 0.108 306.4);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.827 0.108 306.4);
}
/* arbitrary values */
class="text-[#d8b4fe] bg-[oklch(0.827_0.108_306.4)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.8243 0.7112 0.9764); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #d8b4fe calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- purple-300#DAB2FF
- v3 violet-300#C4B5FD
- violet-300#C4B4FF
- v3 fuchsia-300#F0ABFC
- fuchsia-300#F4A8FF
- plum#DDA0DD
- thistle#D8BFD8
- v3 indigo-300#A5B4FC
Lighter and darker, same hue and chroma
- #ECC7FF · oklch(0.887 0.108 306.4) · ΔL +0.06
- #C5A1EA · oklch(0.767 0.108 306.4) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?