RGB to HEX: #C4B4FF

Also known as: Tailwind violet-300

Result

rgb(196 180 255) → #C4B4FF

Values are shown at full precision, so converting back gives exactly #c4b4ff. 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 = 180 = 11×16 + 4 → B4
    B = 255 = 15×16 + 15 → FF
  2. 2. pairs → HEX

    C4 B4 FF → #C4B4FF

All formats

HEX
#c4b4ff
RGB
rgb(196 180 255)
RGB (legacy)
rgb(196, 180, 255)
HSL
hsl(252.80 100.00% 85.29%) → hsl(253 100% 85%)
HWB
hwb(253 71% 0%)
OKLCH
oklch(0.810 0.106 293.7) · oklch(81.0% 0.106 293.7)
OKLab
oklab(0.810 0.042 -0.097)
Lab (D50)
lab(76.72 17.41 -35.26)
LCH (D50)
lch(76.72 39.32 296.27)
Display P3
color(display-p3 0.7580 0.7081 0.9790)
Linear sRGB
color(srgb-linear 0.5520 0.4564 1.0000)

Gamut: sRGB and Display P3

#C4B4FF is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.106 and Display P3 reaches 0.116; this color uses 100% of the sRGB chroma available.

CSS snippets

.element {
  color: #c4b4ff;
  color: rgb(196 180 255);
  color: hsl(253 100% 85%);
  color: oklch(0.810 0.106 293.7);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.810 0.106 293.7);
}
/* arbitrary values */
class="text-[#c4b4ff] bg-[oklch(0.810_0.106_293.7)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.7580 0.7081 0.9790); }
}

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

  • #D7C7FF · oklch(0.870 0.106 293.7) · ΔL +0.06
  • #B1A1EB · oklch(0.750 0.106 293.7) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?