HEX to RGB: #4D0218

Also known as: Tailwind rose-950

Result

#4D0218 → rgb(77 2 24)

Values are shown at full precision, so converting back gives exactly #4d0218. 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

    #4D0218 → 4D | 02 | 18
  2. 2. base 16 → base 10

    R = 4D₁₆ = 4×16 + 13 = 77
    G = 02₁₆ = 0×16 + 2 = 2
    B = 18₁₆ = 1×16 + 8 = 24
  3. 3. RGB

    rgb(77 2 24)

All formats

HEX
#4d0218
RGB
rgb(77 2 24)
RGB (legacy)
rgb(77, 2, 24)
HSL
hsl(342.40 94.94% 15.49%) → hsl(342 95% 15%)
HWB
hwb(342 1% 70%)
OKLCH
oklch(0.270 0.105 12.3) · oklch(27.0% 0.105 12.3)
OKLab
oklab(0.270 0.103 0.022)
Lab (D50)
lab(14.12 33.98 9.97)
LCH (D50)
lch(14.12 35.42 16.36)
Display P3
color(display-p3 0.2743 0.0394 0.0974)
Linear sRGB
color(srgb-linear 0.0742 0.0006 0.0091)

Gamut: sRGB and Display P3

#4D0218 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.108 and Display P3 reaches 0.122; this color uses 97% of the sRGB chroma available.

CSS snippets

.element {
  color: #4d0218;
  color: rgb(77 2 24);
  color: hsl(342 95% 15%);
  color: oklch(0.270 0.105 12.3);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.270 0.105 12.3);
}
/* arbitrary values */
class="text-[#4d0218] bg-[oklch(0.270_0.105_12.3)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.2743 0.0394 0.0974); }
}

/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #4d0218 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

  • #5F1626 · oklch(0.330 0.105 12.3) · ΔL +0.06
  • #3B000A · oklch(0.210 0.105 12.3) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?