HSL to HEX: #6366F1

Also known as: Tailwind v3 indigo-500

Result

hsl(238.73 83.53% 66.67%) → #6366F1

Values are shown at full precision, so converting back gives exactly #6366f1. 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 = 238.73°, S = 83.53%, L = 66.67%
  2. 2. C

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

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

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

    (R′, G′, B′) = (0.00000, 0.01179, 0.55681)
    R = round((0.00000 + 0.38829) × 255) = 99
    G = round((0.01179 + 0.38829) × 255) = 102
    B = round((0.55681 + 0.38829) × 255) = 241
  6. 6. RGB → HEX

    #6366F1

All formats

HEX
#6366f1
RGB
rgb(99 102 241)
RGB (legacy)
rgb(99, 102, 241)
HSL
hsl(238.73 83.53% 66.67%) → hsl(239 84% 67%)
HWB
hwb(239 39% 5%)
OKLCH
oklch(0.585 0.204 277.1) · oklch(58.5% 0.204 277.1)
OKLab
oklab(0.585 0.025 -0.202)
Lab (D50)
lab(49.05 30.34 -71.87)
LCH (D50)
lch(49.05 78.02 292.89)
Display P3
color(display-p3 0.3904 0.3996 0.9126)
Linear sRGB
color(srgb-linear 0.1248 0.1329 0.8796)

Gamut: sRGB and Display P3

#6366F1 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.229 and Display P3 reaches 0.246; this color uses 89% of the sRGB chroma available.

CSS snippets

.element {
  color: #6366f1;
  color: rgb(99 102 241);
  color: hsl(239 84% 67%);
  color: oklch(0.585 0.204 277.1);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.585 0.204 277.1);
}
/* arbitrary values */
class="text-[#6366f1] bg-[oklch(0.585_0.204_277.1)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.3904 0.3996 0.9126); }
}

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

  • #7379FF · oklch(0.645 0.204 277.1) · ΔL +0.06
  • #5452DC · oklch(0.525 0.204 277.1) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?