CSS color names · Purples

Magenta color: hex #ff00ff, RGB and HSL

Magenta is the CSS keyword magenta (also fuchsia), hex #ff00ff, rgb(255, 0, 255), hsl(300, 100%, 50%). It is a medium, fully saturated magenta in the purples family. Below: the colors that go with it, its tints and shades, how it reads as text, and a complete interface palette built from it.

CSS name
magenta, fuchsia
Hex
#ff00ff
RGB
rgb(255, 0, 255)
HSL
hsl(300, 100%, 50%)
On white
3.14:1 — large text and UI only (3:1)
On black
6.7:1 — passes AA for body text
.example {
  color: magenta;          /* keyword */
  color: #ff00ff;          /* hex */
  color: rgb(255, 0, 255); /* rgb */
  color: hsl(300, 100%, 50%); /* hsl */
}

What colors go with magenta

Each match keeps magenta's saturation and lightness and rotates only the hue, so the relationship is the wheel's and nothing else. Any of these can be an accent beside magenta as the primary; the harmony guides explain which rule suits which interface.

Complementary

The opposite hue, 180° away — the strongest contrast, best kept to one accent per screen.

Split-complementary

The two neighbors of the complement, at 150° and 210° — most of the contrast with less tension, and two accents instead of one.

#80ff00
#00ff80

Triadic

Two hues at 120° and 240° — three evenly spaced signals, the scheme charts and category colors want.

Analogous

The neighbors at −30° and +30° — calm and cohesive, with emphasis coming from weight and size rather than hue.

#8000ff
#ff0080

Tints and shades of magenta

Tints add lightness toward white; shades remove it toward black. The hue and saturation stay fixed, so every step still reads as magenta — these are the hover, pressed, disabled and surface variants a single brand color needs.

Tints (lighter)

#ff2bff
#ff55ff
#ff80ff
#ffaaff
#ffd4ff

Shades (darker)

#d400d4
#aa00aa
#800080 · purple
#550055
#2b002b

A UI color palette built from magenta

The eight semantic roles an interface actually uses, derived from magenta as the primary with the split-complementary rule: secondary and accent rotate around the wheel, and the five neutrals take the hue at lightness steps tuned for light and dark mode. This is the same derivation the palette generator runs — open it there to change the rule, drag the anchors, or export the set as CSS variables.

Light mode
primary
#ff00ff
secondary
#80ff00
accent
#00ff80
background
#fdfcfd
surface
#f7f3f7
text
#221122
muted
#8f568f
border
#ecdfec
Dark mode
primary
#ff1aff
secondary
#8cff1a
accent
#1aff8c
background
#1b0e1b
surface
#281528
text
#f6f3f6
muted
#b894b8
border
#492749

Using magenta in an interface

Purple is the hue most SaaS products have settled on for a primary — it is distinct from the blues of links and the reds and greens of status. The slate blues and indigo make dependable primaries; the light lavenders make tinted surfaces that still read as brand. Whichever role magenta takes, define it once as a token rather than repeating the keyword: the semantic palette guide covers the eight roles, and the guides to complementary, triadic and the other color schemes explain how to weight the matches above.

What is the hex code for Magenta?
Magenta is #ff00ff. In CSS the keyword magenta, the hex #ff00ff, rgb(255, 0, 255) and hsl(300, 100%, 50%) all paint the same color. The keyword fuchsia resolves to the same color.
What colors go with Magenta?
Its complement is #00ff00, the split-complementary pair is #80ff00 and #00ff80, the triadic partners are #ffff00 and #00ffff, and the analogous neighbors are #8000ff and #ff0080. In an interface, use Magenta for most colored elements and one of these for a single accent, at roughly an 80/20 split.
What is the opposite of Magenta on the color wheel?
The opposite (complementary) color is #00ff00, the same saturation and lightness rotated 180° around the HSL wheel. Complementary pairs give the strongest contrast, which is why the complement should be used sparingly rather than at equal weight.
Can I use Magenta for text?
Magenta as text on white has a contrast ratio of 3.14:1, which fails WCAG AA for body text (4.5:1) but passes for large text and UI components (3:1). On black it is 6.7:1, which passes for body text. Use it as text on dark surfaces, or as a fill with dark text on top.

Similar named colors

More purples

We'd like to use Google cookies to understand how Nodlume is used and to measure our advertising. Nothing loads until you choose, and declining does not affect anything in the app.