Free Accessible CSS Gradient Generator

← All Colors
#8B008B Dark Magenta

Dark Magenta Hex Code #8B008B

Dark Magenta is a dark, strong purple with the hex code #8B008B. In RGB it is 139, 0, 139, and in HSL it is 300°, 100%, 27%. It is one of the 148 named colors in CSS, so you can write “darkmagenta” instead of the hex code.

HEX
#8B008B
RGB
rgb(139, 0, 139)
HSL
hsl(300, 100%, 27%)
HSV
hsv(300°, 100%, 55%)
CMYK
cmyk(0%, 100%, 0%, 45%)
CSS name
darkmagenta

CMYK is a simple screen-to-print estimate. Real print results depend on the printer and paper.

About Dark Magenta

On a white background Dark Magenta has a contrast ratio of 8.50:1 (AAA), and on black 2.47:1 (Fail). White 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.

Shades and tints of Dark Magenta

Tints mix Dark Magenta with white and shades mix it with black, in steps of 20%. Select a swatch to copy its hex code.

Color harmonies for Dark Magenta

These schemes are calculated from Dark Magenta on the RGB (screen) color wheel. Select a swatch to copy it, or open any scheme in the color wheel to adjust it.

Analogous

Open in the color wheel

Triadic

Open in the color wheel

Tetradic

Open in the color wheel

Square

Open in the color wheel

On the artist’s RYB wheel, the complement of Dark Magenta is #628B00, close to the named color Olive Drab.

Dark 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 Dark Magenta scores against white and black.

Contrast of Dark Magenta with white and black
AgainstRatioAA normalAA largeAAA normalAAA large
White (#ffffff) 8.50:1 ✓ Pass ✓ Pass ✓ Pass ✓ Pass
Black (#000000) 2.47:1 ✕ Fail ✕ Fail ✕ Fail ✕ Fail
Aa White text on Dark Magenta8.50:1
Aa Black text on Dark Magenta2.47:1

Dark Magenta and color blindness

These are approximate previews of how Dark Magenta can look with the main types of color vision deficiency.

Protanopia #00428E

Dark Magenta changes noticeably.

Deuteranopia #355288

Dark Magenta changes noticeably.

Tritanopia #902450

Dark Magenta changes noticeably.

Achromatopsia #4D4D4D

Dark Magenta changes noticeably.

Gradients with Dark Magenta

Three ready-made starting points. Copy the CSS, or open one in the generator to edit the stops and check contrast.

Dark Magenta to a lighter tint

background: linear-gradient(135deg, #8b008b 0%, #d199d1 100%);

Dark Magenta to its analogous neighbour

background: linear-gradient(135deg, #8b008b 0%, #8b0046 100%);

Dark Magenta to its complement

background: linear-gradient(135deg, #8b008b 0%, #008b00 100%);

Colors similar to Dark Magenta

How each close match differs from Dark Magenta.

More purple colors →

Use Dark Magenta in code

CSS
.element {
  color: #8b008b;
  background-color: #8b008b;
  border-color: darkmagenta;   /* darkmagenta is a valid CSS color name */
}
CSS variable
:root {
  --color-dark-magenta: #8b008b;
}
Tailwind
<!-- Tailwind arbitrary values -->
<div class="bg-[#8b008b] text-[#8b008b] border-[#8b008b]"></div>

/* Tailwind v4 theme color */
@theme {
  --color-dark-magenta: #8b008b;
}

Dark Magenta questions

What is the hex code for Dark Magenta?

The hex code for Dark Magenta is #8B008B. In RGB that is rgb(139, 0, 139), and in HSL it is hsl(300, 100%, 27%).

What is the complementary color of Dark Magenta?

On the RGB (screen) color wheel, the complement of Dark Magenta is #008B00, which is close to Green. On the artist’s RYB wheel it is #628B00, close to Olive Drab.

Should I use white or black text on Dark Magenta?

White text. It has a contrast ratio of 8.50:1 against Dark Magenta, which is WCAG AAA. The other option scores 2.47:1.

Is Dark Magenta accessible as a text color on white?

Yes. Dark Magenta on white scores 8.50:1, which passes WCAG AA for normal text (4.5:1) and AAA (7:1).

What are darker and lighter shades of Dark Magenta?

Mixing Dark Magenta with black gives #6F006F, #530053, #380038, #1C001C (20% to 80% black). Mixing it with white gives #A233A2, #B966B9, #D199D1, #E8CCE8 (20% to 80% white).

More color tools