RGB to HEX: #E12AFB

Also known as: Tailwind fuchsia-500

Result

rgb(225 42 251) → #E12AFB

Values are shown at full precision, so converting back gives exactly #e12afb. 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 = 225 = 14×16 + 1 → E1
    G = 42 = 2×16 + 10 → 2A
    B = 251 = 15×16 + 11 → FB
  2. 2. pairs → HEX

    E1 2A FB → #E12AFB

All formats

HEX
#e12afb
RGB
rgb(225 42 251)
RGB (legacy)
rgb(225, 42, 251)
HSL
hsl(292.54 96.31% 57.45%) → hsl(293 96% 57%)
HWB
hwb(293 16% 2%)
OKLCH
oklch(0.666 0.295 322.1) · oklch(66.6% 0.295 322.1)
OKLab
oklab(0.666 0.233 -0.181)
Lab (D50)
lab(56.35 83.11 -64.74)
LCH (D50)
lch(56.35 105.35 322.08)
Display P3
color(display-p3 0.8114 0.2411 0.9514)
Linear sRGB
color(srgb-linear 0.7529 0.0232 0.9647)

Gamut: sRGB and Display P3

#E12AFB is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.307 and Display P3 reaches 0.335; this color uses 96% of the sRGB chroma available.

CSS snippets

.element {
  color: #e12afb;
  color: rgb(225 42 251);
  color: hsl(293 96% 57%);
  color: oklch(0.666 0.295 322.1);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.666 0.295 322.1);
}
/* arbitrary values */
class="text-[#e12afb] bg-[oklch(0.666_0.295_322.1)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.8114 0.2411 0.9514); }
}

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

  • #F647FF · oklch(0.726 0.295 322.1) · ΔL +0.06
  • #CC00E6 · oklch(0.606 0.295 322.1) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?