HEX to RGB: #6366F1

Also known as: Tailwind v3 indigo-500

Result

#6366F1 → rgb(99 102 241)

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. HEX → pairs

    #6366F1 → 63 | 66 | F1
  2. 2. base 16 → base 10

    R = 63₁₆ = 6×16 + 3 = 99
    G = 66₁₆ = 6×16 + 6 = 102
    B = F1₁₆ = 15×16 + 1 = 241
  3. 3. RGB

    rgb(99 102 241)

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?