CSS named color

Magenta #FF00FF

magenta rgb(255, 0, 255)

Magenta is a vivid magenta with the hex code #FF00FF, which converts to rgb(255, 0, 255). It is identical to Fuchsia — two keywords, one color. Open #FF00FF in the converter to tweak it.

Magenta color values

HEX#FF00FF
HEX (shorthand)#F0F
RGBrgb(255, 0, 255)
RGBArgba(255, 0, 255, 1)
8-digit HEX#FF00FFFF
HSLhsl(300, 100%, 50%)
HSV / HSB300°, 100%, 100%
CMYK0%, 100%, 0%, 0%
RGB 0–11, 0, 1
Decimal16711935
CSS keywordmagenta

How #FF00FF converts to RGB

Split the hex code into three pairs and read each pair as a base-16 number: FF → 255, 00 → 0, FF → 255. That gives rgb(255, 0, 255). The step-by-step guide explains the math.

Shades of Magenta

Mixed toward black in 10% steps. Click a swatch to copy its hex.

Tints of Magenta

Mixed toward white in 10% steps.

Color harmonies

Hue rotations of Magenta on the HSL color wheel, keeping saturation and lightness fixed. The color harmony guide explains when each scheme works.

Complementary

Analogous

Split-complementary

Triadic

Tetradic (square)

Contrast and accessibility

TextBackgroundRatioWCAG 2.x
White Magenta 3.13:1AA Large only
Black Magenta 6.69:1AA

Use black text on a magenta background. Test any other pair in the contrast checker; thresholds are explained in the WCAG contrast guide.

Use Magenta in CSS

.element {
  color: magenta;                         /* keyword */
  background-color: #FF00FF;            /* hex */
  border-color: rgb(255 0 255 / 50%);    /* 50% transparent */
}

Need it semi-transparent? Append an alpha byte: #FF00FF80 is Magenta at 50% opacity. See RGBA & transparency.

Similar named colors

FAQ

What is the HEX code for Magenta?

The CSS named color magenta is #FF00FF in hexadecimal. In CSS you can write color: magenta; or color: #FF00FF; — both produce the same pixel.

What is Magenta in RGB?

Magenta is rgb(255, 0, 255): red 255, green 0, blue 255 on the 0–255 scale. As normalized 0–1 floats that is (1, 0, 1).

Is white or black text more readable on Magenta?

Black text is more readable. White on #FF00FF has a contrast ratio of 3.13:1 (AA Large only), black on #FF00FF has 6.69:1 (AA). WCAG AA needs 4.5:1 for normal text.

Copied!