Magenta Hex Code #FF00FF
Magenta is a light, vivid purple with the hex code #FF00FF. In RGB it is 255, 0, 255, and in HSL it is 300°, 100%, 50%. It is one of the 148 named colors in CSS, so you can write “magenta” instead of the hex code. It is also written as “fuchsia”.
- HEX
- #FF00FF
- RGB
- rgb(255, 0, 255)
- HSL
- hsl(300, 100%, 50%)
- HSV
- hsv(300°, 100%, 100%)
- CMYK
- cmyk(0%, 100%, 0%, 0%)
- CSS name
- magenta
CMYK is a simple screen-to-print estimate. Real print results depend on the printer and paper.
About Magenta
On a white background Magenta has a contrast ratio of 3.14:1 (AA Large), and on black 6.70:1 (AA). Black text is the better choice on top of it.
It sits between the warm and cool halves of the color wheel, so it pairs comfortably with either.
Purple combines the calm of blue with the energy of red. It reads as creative and premium, and is often used by design, media and beauty brands.
Good to know: Magenta and fuchsia are two names for the same color in CSS (#ff00ff). The same is true of cyan and aqua (#00ffff).
Shades and tints of Magenta
Tints mix Magenta with white and shades mix it with black, in steps of 20%. Select a swatch to copy its hex code.
Color harmonies for Magenta
These schemes are calculated from Magenta on the RGB (screen) color wheel. Select a swatch to copy it, or open any scheme in the color wheel to adjust it.
On the artist’s RYB wheel, the complement of Magenta is #B4FF00, close to the named color Green Yellow.
Magenta contrast and accessibility
WCAG asks for a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (AA), and 7:1 and 4.5:1 for AAA. This is how Magenta scores against white and black.
| Against | Ratio | AA normal | AA large | AAA normal | AAA large |
|---|---|---|---|---|---|
| White (#ffffff) | 3.14:1 | ✕ Fail | ✓ Pass | ✕ Fail | ✕ Fail |
| Black (#000000) | 6.70:1 | ✓ Pass | ✓ Pass | ✕ Fail | ✓ Pass |
Magenta and color blindness
These are approximate previews of how Magenta can look with the main types of color vision deficiency.
Magenta changes noticeably.
Magenta changes noticeably.
Magenta changes noticeably.
Magenta changes noticeably.
Gradients with Magenta
Three ready-made starting points. Copy the CSS, or open one in the generator to edit the stops and check contrast.
Magenta to a lighter tint
background: linear-gradient(135deg, #ff00ff 0%, #ff99ff 100%); Magenta to its analogous neighbour
background: linear-gradient(135deg, #ff00ff 0%, #ff0080 100%); Magenta to its complement
background: linear-gradient(135deg, #ff00ff 0%, #00ff00 100%); Colors similar to Magenta
How each close match differs from Magenta.
- Dark Violet #9400D3 Darker, more muted, leans more violet.
- Blue Violet #8A2BE2 Darker, more muted, leans more violet.
- Dark Orchid #9932CC Darker, more muted, leans more violet.
- Medium Orchid #BA55D3 Slightly darker, more muted, leans more violet.
- Violet #EE82EE Slightly lighter, more muted.
- Dark Magenta #8B008B Darker, more muted.
Use Magenta in code
.element {
color: #ff00ff;
background-color: #ff00ff;
border-color: magenta; /* magenta is a valid CSS color name */
} :root {
--color-magenta: #ff00ff;
} <!-- Tailwind arbitrary values -->
<div class="bg-[#ff00ff] text-[#ff00ff] border-[#ff00ff]"></div>
/* Tailwind v4 theme color */
@theme {
--color-magenta: #ff00ff;
} Magenta questions
What is the hex code for Magenta?
The hex code for Magenta is #FF00FF. In RGB that is rgb(255, 0, 255), and in HSL it is hsl(300, 100%, 50%).
What is the complementary color of Magenta?
On the RGB (screen) color wheel, the complement of Magenta is #00FF00, which is close to Lime. On the artist’s RYB wheel it is #B4FF00, close to Green Yellow.
Should I use white or black text on Magenta?
Black text. It has a contrast ratio of 6.70:1 against Magenta, which is WCAG AA. The other option scores 3.14:1.
Is Magenta accessible as a text color on white?
Only for large text. Magenta on white scores 3.14:1, which passes WCAG AA for large text (3:1) but not for normal text (4.5:1).
What are darker and lighter shades of Magenta?
Mixing Magenta with black gives #CC00CC, #990099, #660066, #330033 (20% to 80% black). Mixing it with white gives #FF33FF, #FF66FF, #FF99FF, #FFCCFF (20% to 80% white).