RGB to HEX: #9810FA
Also known as: Tailwind purple-600
Result
rgb(152 16 250) → #9810FA
Values are shown at full precision, so converting back gives exactly #9810fa. 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. base 10 → base 16
R = 152 = 9×16 + 8 → 98 G = 16 = 1×16 + 0 → 10 B = 250 = 15×16 + 10 → FA
2. pairs → HEX
98 10 FA → #9810FA
All formats
- HEX
- #9810fa
- RGB
- rgb(152 16 250)
- RGB (legacy)
- rgb(152, 16, 250)
- HSL
- hsl(274.87 95.90% 52.16%) → hsl(275 96% 52%)
- HWB
- hwb(275 6% 2%)
- OKLCH
- oklch(0.558 0.288 302.3) · oklch(55.8% 0.288 302.3)
- OKLab
- oklab(0.558 0.154 -0.243)
- Lab (D50)
- lab(42.99 75.11 -86.49)
- LCH (D50)
- lch(42.99 114.55 310.97)
- Display P3
- color(display-p3 0.5460 0.1305 0.9435)
- Linear sRGB
- color(srgb-linear 0.3140 0.0052 0.9560)
Gamut: sRGB and Display P3
#9810FA is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.294 and Display P3 reaches 0.307; this color uses 98% of the sRGB chroma available.
CSS snippets
.element {
color: #9810fa;
color: rgb(152 16 250);
color: hsl(275 96% 52%);
color: oklch(0.558 0.288 302.3);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.558 0.288 302.3);
}
/* arbitrary values */
class="text-[#9810fa] bg-[oklch(0.558_0.288_302.3)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.5460 0.1305 0.9435); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #9810fa calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- v3 purple-600#9333EA
- blueviolet#8A2BE2
- violet-600#7F22FE
- v3 violet-600#7C3AED
- darkviolet#9400D3
- purple-700#8200DB
- purple-500#AD46FF
- violet-500#8E51FF
Lighter and darker, same hue and chroma
- #AA36FF · oklch(0.618 0.288 302.3) · ΔL +0.06
- #8600E5 · oklch(0.498 0.288 302.3) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?