HEX to RGB: #9370DB
Also known as: CSS mediumpurple
Result
#9370DB → rgb(147 112 219)
Values are shown at full precision, so converting back gives exactly #9370db. 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
#9370DB → 93 | 70 | DB
2. base 16 → base 10
R = 93₁₆ = 9×16 + 3 = 147 G = 70₁₆ = 7×16 + 0 = 112 B = DB₁₆ = 13×16 + 11 = 219
3. RGB
rgb(147 112 219)
All formats
- HEX
- #9370db
- RGB
- rgb(147 112 219)
- RGB (legacy)
- rgb(147, 112, 219)
- HSL
- hsl(259.63 59.78% 64.90%) → hsl(260 60% 65%)
- HWB
- hwb(260 44% 14%)
- OKLCH
- oklch(0.627 0.158 296.7) · oklch(62.7% 0.158 296.7)
- OKLab
- oklab(0.627 0.071 -0.141)
- Lab (D50)
- lab(54.45 31.71 -50.62)
- LCH (D50)
- lch(54.45 59.73 302.06)
- Display P3
- color(display-p3 0.5552 0.4446 0.8332)
- Linear sRGB
- color(srgb-linear 0.2918 0.1620 0.7084)
Gamut: sRGB and Display P3
#9370DB is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.230 and Display P3 reaches 0.249; this color uses 69% of the sRGB chroma available.
CSS snippets
.element {
color: #9370db;
color: rgb(147 112 219);
color: hsl(260 60% 65%);
color: oklch(0.627 0.158 296.7);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.627 0.158 296.7);
}
/* arbitrary values */
class="text-[#9370db] bg-[oklch(0.627_0.158_296.7)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.5552 0.4446 0.8332); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #9370db calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- mediumslateblue#7B68EE
- v3 violet-500#8B5CF6
- indigo-400#7C86FF
- violet-400#A684FF
- v3 indigo-400#818CF8
- v3 purple-500#A855F7
- v3 violet-400#A78BFA
- mediumorchid#BA55D3
Lighter and darker, same hue and chroma
- #A583EF · oklch(0.687 0.158 296.7) · ΔL +0.06
- #815EC7 · oklch(0.567 0.158 296.7) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?