CSS named color
DarkMagenta #8B008B
DarkMagenta (CSS keyword darkmagenta) has the hex code #8B008B and the RGB value rgb(139, 0, 139): a dark, vivid purple.
Dark magenta (#8b008b) is the X11 dark variant of magenta and is very close to purple (#800080), just slightly brighter.
Color codes for DarkMagenta
| CSS keyword | darkmagenta |
|---|---|
| HEX | #8B008B |
| RGB | rgb(139, 0, 139) |
| HSL | hsl(300, 100%, 27%) |
| HWB | hwb(300 0% 45%) |
| OKLCH | oklch(44.7% 0.205 328.4) |
| CMYK (naive, no ICC profile) | cmyk(0%, 100%, 0%, 45%) |
| Decimal | 9,109,643 |
| Hue family | Purples and violets |
Contrast and accessibility
On darkmagenta, white text has a contrast ratio of 8.49:1 and passes AAA at any text size; black text reaches 2.47:1.
WCAG 2.2 contrast ratios (success criteria 1.4.3 and 1.4.6: AA needs 4.5:1 for normal text and 3:1 for large text, AAA needs 7:1 and 4.5:1). APCA Lc is the lightness contrast from the APCA-W3 0.0.98G model proposed for WCAG 3; a higher absolute value is more readable, and Lc 75 is its suggested minimum for body text.
| Pair | Ratio | AA | AA large | AAA | AAA large | APCA Lc |
|---|---|---|---|---|---|---|
| Black text on darkmagenta | 2.47:1 | Fail | Fail | Fail | Fail | 17.0 |
| White text on darkmagenta | 8.49:1 | Pass | Pass | Pass | Pass | −91.7 |
| Darkmagenta text on white | 8.49:1 | Pass | Pass | Pass | Pass | 87.0 |
| Darkmagenta text on black | 2.47:1 | Fail | Fail | Fail | Fail | −15.1 |
Tints and shades
Each step mixes darkmagenta with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, darkmagenta, white 25%) in CSS.
Tints (mixed with white)
- 5%
#910d91 - 15%
#9c269c - 25%
#a840a8 - 35%
#b459b4 - 45%
#bf73bf - 55%
#cb8ccb - 65%
#d6a6d6 - 75%
#e2bfe2 - 85%
#eed9ee - 95%
#f9f2f9
Shades (mixed with black)
- 5%
#840084 - 15%
#760076 - 25%
#680068 - 35%
#5a005a - 45%
#4c004c - 55%
#3f003f - 65%
#310031 - 75%
#230023 - 85%
#150015 - 95%
#070007
Color harmonies
Rotating the hue in OKLCH while keeping lightness and chroma, darkmagenta's complementary color is #006A13 (close to darkgreen), its analogous colors are #6725B3 and #A10053, and its triadic partners are #6D4F00 and #006270. For text on top, white gives the higher contrast.
| Harmony | Rotation | Color |
|---|---|---|
| Complementary | +180° | #006a13 |
| Analogous | −30°, +30° | #6725b3#a10053 |
| Triadic | +120°, +240° | #6d4f00#006270 |
| Split-complementary | +150°, +210° | #4f5c00#006655 |
Computed in OKLCH: the hue is rotated by 180° (complementary), ±30° (analogous), ±120° (triadic) and 180° ±30° (split-complementary) while lightness and chroma stay fixed. Results that fall outside sRGB are brought back with the CSS Color 4 gamut mapping algorithm. Because this uses OKLCH, the values differ from tools that rotate hue in HSL, but every color keeps the same perceived lightness.
Warm or cool?
DarkMagenta sits on the boundary: its hue of 300° on the HSL wheel is a magenta, which reads warm next to blues and cool next to reds and oranges.
Nearest named and Tailwind colors
Distance is ΔE OK, the Euclidean distance in OKLab multiplied by 100. Values under about 2 are hard to tell apart side by side.
Nearest CSS named colors
| Color | HEX | ΔE OK |
|---|---|---|
| purple | #800080 | 2.8 |
| rebeccapurple | #663399 | 9.1 |
| darkviolet | #9400d3 | 11.5 |
Nearest Tailwind v4 colors
| Color | HEX | ΔE OK |
|---|---|---|
| fuchsia-800 | #8a0194 | 1.6 |
| fuchsia-900 | #721378 | 5.9 |
| fuchsia-700 | #a800b7 | 8.7 |
Code snippets
.element {
color: darkmagenta;
background-color: #8b008b;
border-color: rgb(139 0 139);
outline-color: oklch(44.7% 0.205 328.4);
}<div class="bg-[#8b008b] text-white">...</div>
/* or register it once in your CSS (Tailwind v4) */
@theme {
--color-darkmagenta: #8b008b;
}
/* then use bg-darkmagenta, text-darkmagenta, border-darkmagenta */import SwiftUI
extension Color {
static let darkmagenta = Color(red: 0.545, green: 0.000, blue: 0.545)
}import androidx.compose.ui.graphics.Color
val Darkmagenta = Color(0xFF8B008B)import 'package:flutter/material.dart';
const darkmagenta = Color(0xFF8B008B);<!-- res/values/colors.xml -->
<color name="darkmagenta">#8B008B</color>Frequently asked questions
- What is the hex code for darkmagenta?
- The hex code for darkmagenta is #8B008B. The same color is rgb(139, 0, 139), hsl(300, 100%, 27%) and oklch(44.7% 0.205 328.4), and in CSS you can also write the keyword darkmagenta directly.
- Is darkmagenta a warm or cool color?
- DarkMagenta sits on the boundary: its hue of 300° on the HSL wheel is a magenta, which reads warm next to blues and cool next to reds and oranges.
- What colors go with darkmagenta?
- Rotating the hue in OKLCH while keeping lightness and chroma, darkmagenta's complementary color is #006A13 (close to darkgreen), its analogous colors are #6725B3 and #A10053, and its triadic partners are #6D4F00 and #006270. For text on top, white gives the higher contrast.
- Can you use white text on darkmagenta?
- White text on darkmagenta has a contrast ratio of 8.49:1, which passes both AA and AAA under WCAG 2.2. Black text reaches 2.47:1 and fails AA even for large text. In APCA terms that is Lc −91.7 for white and Lc 17.0 for black.
- What is the RGB value of darkmagenta?
- DarkMagenta is rgb(139, 0, 139): red 139, green 0 and blue 139 on the 0 to 255 scale, or 54.5%, 0.0% and 54.5%. As a decimal integer it is 9109643.
Last reviewed by Arielton Oberek.