RGB to HEX: #3C0366
Also known as: Tailwind purple-950
Result
rgb(60 3 102) → #3C0366
Values are shown at full precision, so converting back gives exactly #3c0366. 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 = 60 = 3×16 + 12 → 3C G = 3 = 0×16 + 3 → 03 B = 102 = 6×16 + 6 → 66
2. pairs → HEX
3C 03 66 → #3C0366
All formats
- HEX
- #3c0366
- RGB
- rgb(60 3 102)
- RGB (legacy)
- rgb(60, 3, 102)
- HSL
- hsl(274.55 94.29% 20.59%) → hsl(275 94% 21%)
- HWB
- hwb(275 1% 60%)
- OKLCH
- oklch(0.291 0.149 303.0) · oklch(29.1% 0.149 303.0)
- OKLab
- oklab(0.291 0.081 -0.125)
- Lab (D50)
- lab(14.82 38.87 -44.36)
- LCH (D50)
- lch(14.82 58.98 311.22)
- Display P3
- color(display-p3 0.2131 0.0308 0.3838)
- Linear sRGB
- color(srgb-linear 0.0452 0.0009 0.1329)
Gamut: sRGB and Display P3
#3C0366 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.153 and Display P3 reaches 0.160; this color uses 97% of the sRGB chroma available.
CSS snippets
.element {
color: #3c0366;
color: rgb(60 3 102);
color: hsl(275 94% 21%);
color: oklch(0.291 0.149 303.0);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.291 0.149 303.0);
}
/* arbitrary values */
class="text-[#3c0366] bg-[oklch(0.291_0.149_303.0)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.2131 0.0308 0.3838); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #3c0366 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- v3 purple-950#3B0764
- violet-950#2F0D68
- v3 violet-950#2E1065
- indigo#4B0082
- v3 fuchsia-950#4A044E
- fuchsia-950#4B004F
- midnightblue#191970
- indigo-950#1E1A4D
Lighter and darker, same hue and chroma
- #4C1B78 · oklch(0.351 0.149 303.0) · ΔL +0.06
- #2D0054 · oklch(0.231 0.149 303.0) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?