RGB to HEX: #C4B5FD

Also known as: Tailwind v3 violet-300

Result

rgb(196 181 253) → #C4B5FD

Values are shown at full precision, so converting back gives exactly #c4b5fd. 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 = 196 = 12×16 + 4 → C4
    G = 181 = 11×16 + 5 → B5
    B = 253 = 15×16 + 13 → FD
  2. 2. pairs → HEX

    C4 B5 FD → #C4B5FD

All formats

HEX
#c4b5fd
RGB
rgb(196 181 253)
RGB (legacy)
rgb(196, 181, 253)
HSL
hsl(252.50 94.74% 85.10%) → hsl(253 95% 85%)
HWB
hwb(252 71% 1%)
OKLCH
oklch(0.811 0.101 293.6) · oklch(81.1% 0.101 293.6)
OKLab
oklab(0.811 0.041 -0.093)
Lab (D50)
lab(76.90 16.54 -33.91)
LCH (D50)
lch(76.90 37.73 296.00)
Display P3
color(display-p3 0.7586 0.7119 0.9719)
Linear sRGB
color(srgb-linear 0.5520 0.4621 0.9823)

Gamut: sRGB and Display P3

#C4B5FD is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.105 and Display P3 reaches 0.115; this color uses 97% of the sRGB chroma available.

CSS snippets

.element {
  color: #c4b5fd;
  color: rgb(196 181 253);
  color: hsl(253 95% 85%);
  color: oklch(0.811 0.101 293.6);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.811 0.101 293.6);
}
/* arbitrary values */
class="text-[#c4b5fd] bg-[oklch(0.811_0.101_293.6)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.7586 0.7119 0.9719); }
}

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

  • #D7C8FF · oklch(0.871 0.101 293.6) · ΔL +0.06
  • #B1A2E9 · oklch(0.751 0.101 293.6) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?