RGB to HEX: #818CF8

Also known as: Tailwind v3 indigo-400

Result

rgb(129 140 248) → #818CF8

Values are shown at full precision, so converting back gives exactly #818cf8. 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 = 129 = 8×16 + 1 → 81
    G = 140 = 8×16 + 12 → 8C
    B = 248 = 15×16 + 8 → F8
  2. 2. pairs → HEX

    81 8C F8 → #818CF8

All formats

HEX
#818cf8
RGB
rgb(129 140 248)
RGB (legacy)
rgb(129, 140, 248)
HSL
hsl(234.45 89.47% 73.92%) → hsl(234 89% 74%)
HWB
hwb(234 51% 3%)
OKLCH
oklch(0.680 0.158 276.9) · oklch(68.0% 0.158 276.9)
OKLab
oklab(0.680 0.019 -0.157)
Lab (D50)
lab(61.11 17.73 -56.28)
LCH (D50)
lch(61.11 59.00 287.48)
Display P3
color(display-p3 0.5139 0.5477 0.9441)
Linear sRGB
color(srgb-linear 0.2195 0.2623 0.9387)

Gamut: sRGB and Display P3

#818CF8 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.170 and Display P3 reaches 0.184; this color uses 93% of the sRGB chroma available.

CSS snippets

.element {
  color: #818cf8;
  color: rgb(129 140 248);
  color: hsl(234 89% 74%);
  color: oklch(0.680 0.158 276.9);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.680 0.158 276.9);
}
/* arbitrary values */
class="text-[#818cf8] bg-[oklch(0.680_0.158_276.9)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.5139 0.5477 0.9441); }
}

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

  • #939FFF · oklch(0.740 0.158 276.9) · ΔL +0.06
  • #7079E3 · oklch(0.620 0.158 276.9) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?