RGB to HEX: #510424

Also known as: Tailwind pink-950

Result

rgb(81 4 36) → #510424

Values are shown at full precision, so converting back gives exactly #510424. 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. base 10 → base 16

    R = 81 = 5×16 + 1 → 51
    G = 4 = 0×16 + 4 → 04
    B = 36 = 2×16 + 4 → 24
  2. 2. pairs → HEX

    51 04 24 → #510424

All formats

HEX
#510424
RGB
rgb(81 4 36)
RGB (legacy)
rgb(81, 4, 36)
HSL
hsl(335.06 90.59% 16.67%) → hsl(335 91% 17%)
HWB
hwb(335 2% 68%)
OKLCH
oklch(0.284 0.109 3.6) · oklch(28.4% 0.109 3.6)
OKLab
oklab(0.284 0.109 0.007)
Lab (D50)
lab(15.62 35.16 3.29)
LCH (D50)
lch(15.62 35.32 5.34)
Display P3
color(display-p3 0.2890 0.0497 0.1408)
Linear sRGB
color(srgb-linear 0.0823 0.0012 0.0176)

Gamut: sRGB and Display P3

#510424 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.114 and Display P3 reaches 0.129; this color uses 95% of the sRGB chroma available.

CSS snippets

.element {
  color: #510424;
  color: rgb(81 4 36);
  color: hsl(335 91% 17%);
  color: oklch(0.284 0.109 3.6);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.284 0.109 3.6);
}
/* arbitrary values */
class="text-[#510424] bg-[oklch(0.284_0.109_3.6)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.2890 0.0497 0.1408); }
}

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

  • #631933 · oklch(0.344 0.109 3.6) · ΔL +0.06
  • #3F0016 · oklch(0.224 0.109 3.6) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?