HSL to HEX: #9810FA

Also known as: Tailwind purple-600

Result

hsl(274.87 95.90% 52.16%) → #9810FA

Values are shown at full precision, so converting back gives exactly #9810fa. 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.87°, S = 95.90%, L = 52.16%
  2. 2. C

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

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

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

    (R′, G′, B′) = (0.53326, 0.00000, 0.91757)
    R = round((0.53326 + 0.06281) × 255) = 152
    G = round((0.00000 + 0.06281) × 255) = 16
    B = round((0.91757 + 0.06281) × 255) = 250
  6. 6. RGB → HEX

    #9810FA

All formats

HEX
#9810fa
RGB
rgb(152 16 250)
RGB (legacy)
rgb(152, 16, 250)
HSL
hsl(274.87 95.90% 52.16%) → hsl(275 96% 52%)
HWB
hwb(275 6% 2%)
OKLCH
oklch(0.558 0.288 302.3) · oklch(55.8% 0.288 302.3)
OKLab
oklab(0.558 0.154 -0.243)
Lab (D50)
lab(42.99 75.11 -86.49)
LCH (D50)
lch(42.99 114.55 310.97)
Display P3
color(display-p3 0.5460 0.1305 0.9435)
Linear sRGB
color(srgb-linear 0.3140 0.0052 0.9560)

Gamut: sRGB and Display P3

#9810FA is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.294 and Display P3 reaches 0.307; this color uses 98% of the sRGB chroma available.

CSS snippets

.element {
  color: #9810fa;
  color: rgb(152 16 250);
  color: hsl(275 96% 52%);
  color: oklch(0.558 0.288 302.3);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.558 0.288 302.3);
}
/* arbitrary values */
class="text-[#9810fa] bg-[oklch(0.558_0.288_302.3)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.5460 0.1305 0.9435); }
}

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

  • #AA36FF · oklch(0.618 0.288 302.3) · ΔL +0.06
  • #8600E5 · oklch(0.498 0.288 302.3) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?