THE COLOR LIBRARY / Warm
Magenta color codes.
The CSS magenta color code is #FF00FF. Its RGB value is rgb(255, 0, 255) and its HSL value is hsl(300, 100%, 50%). Start with the exact reference, then choose a shade for the job.
A color name describes a family in everyday language. This page uses the standardized CSS keyword as its reference; your brand’s magenta may be different.
Explore the shades ↓COPY. PASTE. MAKE IT YOURS.
Magenta in HEX, RGB, and HSL
#FF00FFrgb(255, 0, 255)hsl(300, 100%, 50%)HEX and RGB encode the same sRGB reference. HSL is calculated from it and rounded to two decimals for display. These are screen color values, not a CMYK print specification.
ONE COLOR. DIFFERENT ROLES.
Explore magenta tints and shades
Select a swatch to see its codes and compare text contrast.
Make the next step clear.
A label, a surface, and room to breathe.
Selected: ReferenceSelected color
Reference · #FF00FF
rgb(255, 0, 255)hsl(300, 100%, 50%)The specimen picks whichever of black or white has higher contrast. It demonstrates a pair, not a complete accessible component.
Illustrative scale: tints mix the reference with white, shades with black, by the stated percentage in encoded sRGB channels. This is not a perceptually uniform scale. Black tints and white shades remain useful; mixing black with black or white with white repeats the reference.
Text contrast on magenta
The table follows your selected swatch, currently #FF00FF. Decisions use the full calculated ratio; displayed ratios are rounded.
| Text color | Ratio | AA ordinary text | AA large text |
|---|---|---|---|
| Black #000000 | 6.70:1 | Pass · 4.5:1 | Pass · 3:1 |
| White #FFFFFF | 3.14:1 | Fail · 4.5:1 | Pass · 3:1 |
Large text is at least 18pt, or 14pt bold. These numeric checks apply to opaque, solid color pairs. Other criteria, states, backgrounds, and exceptions need review. Read W3C’s contrast guidance.
CSS magenta and fuchsia share #FF00FF. Saturation does not guarantee sufficient contrast for white labels.
Check a custom color pair ↗IN A REAL INTERFACE
How to use magenta in product design
Give it one clear role
Magenta is a saturated accent that can separate one series or category from a neutral interface. Limit its area when the product already contains competing alerts and calls to action.
A UI example to try
Use magenta for an annotated chart series with a direct name and distinguishable marker. A selected series also needs an explicit selection state in the legend.
Work through a real screen
Try magenta as a limited highlight in a neutral interface. Inspect its effect beside links, primary actions, and error messages so it does not compete with every other signal. In data visualization, test the exact series colors and provide readable labels rather than assuming a saturated hue is always distinguishable.
Compare nearby colors by purpose
Compare magenta with purple and pink at the actual rendered size. A chart line, a badge, and a large background need different judgments. Keep decorative emphasis separate from semantic status roles unless the product has an explicit convention.
- Choose the role. Decide whether magenta is a surface, foreground, accent, or status. Name the semantic token after that purpose.
- Test the actual pair. Compare its foreground and background at the intended size. Test hover, selected, focus, and supported themes independently.
- Document the decision. Keep the approved code, usage rule, and contrasting companion together. Preserve labels and non-color cues when communicating a state.
Copy a magenta CSS palette
These numeric names are illustrative palette tokens, not a standard scale. Connect approved values to semantic tokens such as --surface-highlight or --text-primary after testing their pairs.
:root {
--magenta-100: #FFCCFF;
--magenta-300: #FF66FF;
--magenta-500: #FF00FF;
--magenta-700: #BF00BF;
--magenta-900: #800080;
}Common questions about magenta
What is the HEX code for magenta?
The CSS named color magenta is #FF00FF. Use that exact value when you want the standardized reference; use your own documented token when you mean a particular brand shade.
Is magenta accessible?
A color by itself cannot pass or fail accessibility. The foreground/background pair, content size, interaction state, and meaning all matter. Use the table above for the selected solid-color pair, then review the complete interface.