Notification
Go to Home All Tools Compare Glossary Blog Contact

Magenta Color Code: HEX, RGB, HSL and CMYK

Magenta is #ff00ff in hex, rgb(255, 0, 255) in RGB and hsl(300, 100%, 50%) in HSL. Copy any format, check contrast and see shades and matching colours.

Client-Side (Private)
HEX #ff00ff
RGB rgb(255, 0, 255)
HSL hsl(300, 100%, 50%)
HSV hsv(300, 100%, 100%)
CMYK cmyk(0%, 100%, 0%, 0%)
Contrast on white 3.14:1
Live Preview
#ff00ff Magenta
e.g. magenta
Quick try:
Converted Result (ALL)

How to use magenta in CSS

Step-by-step mathematical method you can verify by hand

  1. Use the colour name: color: magenta; or background: magenta;
  2. Or use the hex code: color: #ff00ff;
  3. Or use RGB: color: rgb(255, 0, 255); and add transparency with rgba or rgb(... / 50%).
  4. Or use HSL to adjust it: hsl(300, 100%, 50%). Raise the last number to lighten, lower it to darken.

Magenta in every format

Worked Hand Example
FormatValue
HEX#ff00ff
RGBrgb(255, 0, 255)
HSLhsl(300, 100%, 50%)
HSVhsv(300, 100%, 100%)
CMYKcmyk(0%, 100%, 0%, 0%)
Decimal16711935
magenta = #ff00ff.

Shades and tints of magenta

The hue and saturation of magenta stay the same and only the HSL lightness changes, so every row is the same colour family.

ShadeHEXHSL lightness
Lightest #ffccff 90%
Lighter #ff80ff 75%
Light #ff33ff 60%
Magenta #ff00ff 50%
Dark #cc00cc 40%
Darker #800080 25%
Darkest #3d003d 12%

Colours that go with magenta

Colour-wheel harmonies calculated by rotating the hue.

HarmonyHEXRGB
Complementary #00ff00 rgb(0, 255, 0)
Analogous (+30°) #ff0080 rgb(255, 0, 128)
Analogous (−30°) #8000ff rgb(128, 0, 255)
Triadic (+120°) #ffff00 rgb(255, 255, 0)
Triadic (+240°) #00ffff rgb(0, 255, 255)
Split-complementary (+150°) #80ff00 rgb(128, 255, 0)
Split-complementary (+210°) #00ff80 rgb(0, 255, 128)

Contrast of magenta with black and white text

WCAG 2.x contrast ratios.

Text colourRatioAA normal (4.5)AA large (3)
White 3.14:1 Fail Pass
Black 6.7:1 Pass Pass

More colour codes

Quickly jump to other conversions and color systems

Education

About this converter

01

Exact and Explained

Magenta is #ff00ff in hex, rgb(255, 0, 255) in RGB and hsl(300, 100%, 50%) in HSL. Copy any format, check contrast and see shades and matching colours. The worked example and tables on this page are calculated from the numbers themselves, so you can check the result by hand.

02

Privacy

The conversion runs in your browser. Nothing you type is sent to a server.

Good to know

Questions, answered

Quick answers about how this tool works.

magenta is #ff00ff in hex, rgb(255, 0, 255) in RGB and hsl(300, 100%, 50%) in HSL.

magenta is rgb(255, 0, 255). In the simple CMYK formula it is cmyk(0%, 100%, 0%, 0%) (a screen conversion, not a print profile).

Yes. You can write color: magenta; in CSS and it means exactly #ff00ff.

Black text has a contrast ratio of 6.7:1 and white text 3.14:1 on this colour. Black is the better choice. WCAG AA needs 4.5:1 for normal text.

Was this tool helpful?

★ 5.0 • 2 user ratings

Tap a star to rate instantly

What do you need to work out next?

Search 278+ free tools by name, or pick a category below. Every one runs instantly in your browser — no signup, nothing to install.

More Developer Tools
AI ADVISOR & COACH

Ask AI Advisor

Ask AI