RGB to HEX: #FB2C36

Also known as: Tailwind red-500

Result

rgb(251 44 54) → #FB2C36

Values are shown at full precision, so converting back gives exactly #fb2c36. 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 = 251 = 15×16 + 11 → FB
    G = 44 = 2×16 + 12 → 2C
    B = 54 = 3×16 + 6 → 36
  2. 2. pairs → HEX

    FB 2C 36 → #FB2C36

All formats

HEX
#fb2c36
RGB
rgb(251 44 54)
RGB (legacy)
rgb(251, 44, 54)
HSL
hsl(357.10 96.28% 57.84%) → hsl(357 96% 58%)
HWB
hwb(357 17% 2%)
OKLCH
oklch(0.638 0.237 25.4) · oklch(63.8% 0.237 25.4)
OKLab
oklab(0.638 0.214 0.102)
Lab (D50)
lab(55.58 75.14 49.16)
LCH (D50)
lch(55.58 89.79 33.19)
Display P3
color(display-p3 0.9053 0.2633 0.2525)
Linear sRGB
color(srgb-linear 0.9647 0.0252 0.0369)

Gamut: sRGB and Display P3

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

CSS snippets

.element {
  color: #fb2c36;
  color: rgb(251 44 54);
  color: hsl(357 96% 58%);
  color: oklch(0.638 0.237 25.4);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.638 0.237 25.4);
}
/* arbitrary values */
class="text-[#fb2c36] bg-[oklch(0.638_0.237_25.4)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.9053 0.2633 0.2525); }
}

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

  • #FF4749 · oklch(0.698 0.237 25.4) · ΔL +0.06
  • #E50021 · oklch(0.578 0.237 25.4) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?