HSL to HEX: #59168B

Also known as: Tailwind purple-900

Result

hsl(274.36 72.67% 31.57%) → #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. input

    H = 274.36°, S = 72.67%, L = 31.57%
  2. 2. C

    C = (1 − |2L − 1|) × S = 0.45884
  3. 3. X

    X = C × (1 − |(H / 60°) mod 2 − 1|) = 0.26276   (H / 60° = 4.5727, sector 4)
  4. 4. m

    m = L − C / 2 = 0.08628
  5. 5. (R′, G′, B′) + m

    (R′, G′, B′) = (0.26276, 0.00000, 0.45884)
    R = round((0.26276 + 0.08628) × 255) = 89
    G = round((0.00000 + 0.08628) × 255) = 22
    B = round((0.45884 + 0.08628) × 255) = 139
  6. 6. RGB → HEX

    #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?