Skip to content

Magenta

Hex #FF00FF, rgb(255 0 255). A purple CSS named color.

Open in palette generator

Magenta color codes

Click any value to copy it.

HEX
RGB
HSL
HSV
HWB
CMYK
OKLCH
OKLab
Lab
LCH
CSS keyword

About Magenta

Magenta is a light vivid purple with the hex code #FF00FF. In RGB it is made of 255 red, 0 green and 255 blue; in HSL its hue is 300°, with 100% saturation and 50% lightness. Its perceptual lightness (OKLCH L) is 70.2%.

It is a CSS named color, so you can write "magenta" or "fuchsia" anywhere CSS accepts a color. Against white it has a contrast ratio of 3.14:1 and against black 6.70:1, so black text reads better on it and passes WCAG AA for normal text.

Also written as Fuchsia: CSS treats both spellings as the same color.

Tints, shades and tones

Magenta mixed step by step with white, black and middle gray (#808080).

Tints (with white)

Shades (with black)

Tones (with gray)

Magenta 50-950 scale

A Tailwind-style scale built in OKLCH; the original color sits on the step with the closest lightness.

Colors that go with Magenta

Color harmonies rotate the hue in OKLCH and keep the lightness and chroma. Each color links to its closest named color.

Complementary

Analogous

Triadic

Split complementary

Tetradic

Monochromatic

Contrast and readability

WCAG 2 contrast of Magenta with white and black. The readable text color on Magenta is black.

Magenta textSmall text on white

On white3.14:1

  • AA fail
  • AA Large pass
  • AAA fail
  • UI 3:1 pass

APCA Lc 56

Magenta textSmall text on black

On black6.70:1

  • AA pass
  • AA Large pass
  • AAA fail
  • UI 3:1 pass

APCA Lc -46

Black text on Magenta (#000000)

Test any pair in the contrast checker.

Color blindness preview

How Magenta appears with each type of color vision deficiency (simulated with the Machado model).

  • Protanopia#007FFF
  • Deuteranopia#689BFA
  • Tritanopia#FF4A97
  • Protanomaly#8473FF
  • Deuteranomaly#9A88FB
  • Tritanomaly#FF2FD7
  • Achromatopsia#919191

Colors similar to Magenta

The closest named colors by perceptual difference (OKLab).

Use Magenta in CSS and Tailwind

CSS
.magenta {
  color: magenta; /* #FF00FF */
  background-color: rgb(255 0 255);
  border-color: oklch(70.2% 0.322 328.4);
}
Tailwind CSS
/* Tailwind CSS v4: bg-magenta-500, text-magenta-700... */
@theme {
  --color-magenta-50: #FFF7FE;
  --color-magenta-100: #FFE4FD;
  --color-magenta-200: #FFC6FB;
  --color-magenta-300: #FF93FB;
  --color-magenta-400: #FF00FF;
  --color-magenta-500: #DB00DB;
  --color-magenta-600: #BC00BC;
  --color-magenta-700: #980098;
  --color-magenta-800: #7B007B;
  --color-magenta-900: #650065;
  --color-magenta-950: #2A002A;
}

<!-- or the exact color, no config -->
<div class="bg-[#FF00FF] text-[#000000]">…</div>