Inspect Magenta (#FF00FF) in HEX, RGB, HSL, LCH and OKLCH, check its contrast, and copy the value you need.
Magenta
#FF00FF
Black text reads best on this background, at 6.7:1.
Magenta is one of the 148 CSS named colors, and resolves to #FF00FF in every browser. In numbers that is rgb(255, 0, 255) and hsl(300, 100%, 50%). Perceptually it is a light, vivid color: OKLCH puts its lightness at 70% and its chroma at 0.322. It sits in the pinks at 328 degrees of OKLCH hue, and reads as a cool color.
White text only reaches 3.14:1 here, so black text is the safer pairing at 6.7:1. At this chroma it is loud enough to be an accent or a call to action, but it will fight anything else vivid placed next to it.
The closest CSS named colors to Magenta, measured with CIEDE2000, are Orchid (#DA70D6), MediumOrchid (#BA55D3), Violet (#EE82EE). If Magenta is not quite right, those are the nearest keywords to try before reaching for a custom value.
HEX
#FF00FF
RGB
rgb(255, 0, 255)
HSL
hsl(300, 100%, 50%)
HWB
hwb(300 0% 0%)
CMYK
cmyk(0%, 100%, 0%, 0%)
LAB
lab(60.17 93.54 -60.5)
LCH
lch(60.17 111.4 327.11)
OKLCH
oklch(70.17% 0.3225 328.36)
WCAG asks for 4.5:1 between body text and its background. On #FF00FF white text measures 3.14:1 and black text 6.7:1, so black clears it and white does not.
White text on Magenta
WCAG 2.2
3.14:1
APCA
Lc 60
Fails AA body text
Fails AAA body text
Passes AA large text
Black text on Magenta
WCAG 2.2
6.7:1
APCA
Lc 48
Passes AA body text
Fails AAA body text
Passes AA large text
Check Magenta against any other color in the contrast checker.
Magenta sits at 70% OKLCH lightness. Holding its hue and chroma and moving only that value carries it up to #FFF5FE and down to #100010, which keeps the family recognizable instead of letting it drift toward gray the way a plain HSL ramp does.
#FF68FC
20% lighter
#FF94FB
40% lighter
#FFB8FB
60% lighter
#FFD7FC
80% lighter
#FFF5FE
100% lighter
#C800C8
20% darker
#950095
40% darker
#640064
60% darker
#370037
80% darker
#100010
100% darker
Build a full accessible scale from #FF00FF in the shade generator.
Hues rotated around #FF00FF in OKLCH, then pulled back into the sRGB gamut. Each swatch is labelled with the nearest CSS named color so you have a keyword to start from.
Magenta sits at 328 degrees. Rotating it a half turn lands on 148 degrees, the hue directly opposite. It is the strongest pairing you can make without changing lightness, and the one most likely to vibrate if you use both at full chroma.
The neighbors of Magenta at 298 and 358 degrees. They stay close enough to read as the same family, which is what you want for hover states, secondary surfaces and gradients.
328, 88 and 208 degrees divide the wheel into thirds. Balanced enough to carry a whole palette without one color dominating the other two.
Instead of the complement at 148 degrees, this pair flanks it at 118 and 178. You keep most of the contrast of a complementary pairing while losing the harshness.
Explore more combinations around Magenta on the color wheel.
The biggest shift is under achromatopsia, where #FF00FF reads as #494949, 42.6 CIEDE2000 units away. If Magenta is the only thing marking a state or a series, roughly one viewer in twelve will miss it.
Protanopia
#0036FF
Deuteranopia
#2454F4
Tritanopia
#FF124F
Achromatopsia
#494949
The nearest CSS keywords to #FF00FF, ranked by perceptual distance rather than by how close their hex digits happen to look.