RGB to HEX: #8B0836

Also known as: Tailwind rose-900

Result

rgb(139 8 54) → #8B0836

Values are shown at full precision, so converting back gives exactly #8b0836. 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 = 139 = 8×16 + 11 → 8B
    G = 8 = 0×16 + 8 → 08
    B = 54 = 3×16 + 6 → 36
  2. 2. pairs → HEX

    8B 08 36 → #8B0836

All formats

HEX
#8b0836
RGB
rgb(139 8 54)
RGB (legacy)
rgb(139, 8, 54)
HSL
hsl(338.93 89.12% 28.82%) → hsl(339 89% 29%)
HWB
hwb(339 3% 45%)
OKLCH
oklch(0.411 0.159 10.2) · oklch(41.1% 0.159 10.2)
OKLab
oklab(0.411 0.156 0.028)
Lab (D50)
lab(29.77 51.52 12.53)
LCH (D50)
lch(29.77 53.02 13.67)
Display P3
color(display-p3 0.4986 0.1056 0.2156)
Linear sRGB
color(srgb-linear 0.2582 0.0024 0.0369)

Gamut: sRGB and Display P3

#8B0836 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.164 and Display P3 reaches 0.185; this color uses 97% of the sRGB chroma available.

CSS snippets

.element {
  color: #8b0836;
  color: rgb(139 8 54);
  color: hsl(339 89% 29%);
  color: oklch(0.411 0.159 10.2);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.411 0.159 10.2);
}
/* arbitrary values */
class="text-[#8b0836] bg-[oklch(0.411_0.159_10.2)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.4986 0.1056 0.2156); }
}

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

  • #9F2446 · oklch(0.471 0.159 10.2) · ΔL +0.06
  • #770027 · oklch(0.351 0.159 10.2) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?