Magenta color (#FF00FF)
Magenta is one of the 148 CSS named colors. Use the keyword magenta
anywhere CSS accepts a color, or its hex code #FF00FF, which is rgb(255, 0, 255) in RGB. The keyword fuchsia produces exactly the same color.
It is a medium, vivid cool color with a hue angle of 300° on the HSL color wheel and a perceived lightness of 70% in OKLCH. On a magenta background, black text gives the higher contrast at 6.69:1, which passes WCAG AA for normal text.
Magenta color codes
| CSS name | magenta |
|
|---|---|---|
| HEX | #FF00FF |
|
| HEX (8-digit) | #FF00FFFF |
|
| RGB | rgb(255, 0, 255) |
|
| HSL | hsl(300, 100%, 50%) |
|
| HSV / HSB | hsv(300, 100%, 100%) |
|
| OKLCH | oklch(70.2% 0.3225 328.4) |
|
| CMYK | cmyk(0%, 100%, 0%, 0%) |
Contrast with white and black
WCAG 2 contrast ratios and APCA lightness contrast (Lc) for magenta used as text and as a background.
Tints and shades of magenta
Tints mix magenta with white; shades mix it with black, in 10% steps. Click a swatch to copy it, or build custom scales in the tint & shade generator.
Tints
Shades
Colors that go with magenta
Harmonies calculated on the HSL color wheel. Explore more in the color scheme generator.
Complementary
Analogous
Triadic
Split-Complementary
Magenta with color blindness
Approximately how magenta appears with each type of color vision deficiency. Test full designs with the color blindness simulator.
Using magenta in CSS
.element {
color: magenta;
background-color: #ff00ff;
border-color: rgb(255 0 255 / 50%);
outline-color: oklch(70.2% 0.3225 328.4);
}Similar named colors
See all shades of purple or browse every CSS color name.