HEX to RGB: #4C1D95

Also known as: Tailwind v3 violet-900

Result

#4C1D95 → rgb(76 29 149)

Values are shown at full precision, so converting back gives exactly #4c1d95. 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. 1. HEX → pairs

    #4C1D95 → 4C | 1D | 95
  2. 2. base 16 → base 10

    R = 4C₁₆ = 4×16 + 12 = 76
    G = 1D₁₆ = 1×16 + 13 = 29
    B = 95₁₆ = 9×16 + 5 = 149
  3. 3. RGB

    rgb(76 29 149)

All formats

HEX
#4c1d95
RGB
rgb(76 29 149)
RGB (legacy)
rgb(76, 29, 149)
HSL
hsl(263.50 67.42% 34.90%) → hsl(264 67% 35%)
HWB
hwb(264 11% 42%)
OKLCH
oklch(0.380 0.178 293.7) · oklch(38.0% 0.178 293.7)
OKLab
oklab(0.380 0.072 -0.163)
Lab (D50)
lab(24.67 42.07 -57.98)
LCH (D50)
lch(24.67 71.63 305.97)
Display P3
color(display-p3 0.2754 0.1246 0.5618)
Linear sRGB
color(srgb-linear 0.0723 0.0123 0.3005)

Gamut: sRGB and Display P3

#4C1D95 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.210 and Display P3 reaches 0.217; this color uses 85% of the sRGB chroma available.

CSS snippets

.element {
  color: #4c1d95;
  color: rgb(76 29 149);
  color: hsl(264 67% 35%);
  color: oklch(0.380 0.178 293.7);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.380 0.178 293.7);
}
/* arbitrary values */
class="text-[#4c1d95] bg-[oklch(0.380_0.178_293.7)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.2754 0.1246 0.5618); }
}

/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #4c1d95 calc(l - 0.1) c h); }

Nearby colors

Closest colors in the Tailwind and CSS named palettes (OKLab distance).

Lighter and darker, same hue and chroma

  • #5B32A9 · oklch(0.440 0.178 293.7) · ΔL +0.06
  • #3D0082 · oklch(0.320 0.178 293.7) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?