RGB to HEX: #59168B

Also known as: Tailwind purple-900

Result

rgb(89 22 139) → #59168B

Values are shown at full precision, so converting back gives exactly #59168b. 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 = 89 = 5×16 + 9 → 59
    G = 22 = 1×16 + 6 → 16
    B = 139 = 8×16 + 11 → 8B
  2. 2. pairs → HEX

    59 16 8B → #59168B

All formats

HEX
#59168b
RGB
rgb(89 22 139)
RGB (legacy)
rgb(89, 22, 139)
HSL
hsl(274.36 72.67% 31.57%) → hsl(274 73% 32%)
HWB
hwb(274 9% 45%)
OKLCH
oklch(0.380 0.176 304.8) · oklch(38.0% 0.176 304.8)
OKLab
oklab(0.380 0.100 -0.145)
Lab (D50)
lab(24.84 45.27 -51.43)
LCH (D50)
lch(24.84 68.51 311.35)
Display P3
color(display-p3 0.3201 0.1066 0.5244)
Linear sRGB
color(srgb-linear 0.0999 0.0080 0.2582)

Gamut: sRGB and Display P3

#59168B is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.198 and Display P3 reaches 0.207; this color uses 89% of the sRGB chroma available.

CSS snippets

.element {
  color: #59168b;
  color: rgb(89 22 139);
  color: hsl(274 73% 32%);
  color: oklch(0.380 0.176 304.8);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.380 0.176 304.8);
}
/* arbitrary values */
class="text-[#59168b] bg-[oklch(0.380_0.176_304.8)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.3201 0.1066 0.5244); }
}

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

  • #6A2C9E · oklch(0.440 0.176 304.8) · ΔL +0.06
  • #490078 · oklch(0.320 0.176 304.8) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?