Dark Violet color (#9400D3)
Dark Violet is one of the 148 CSS named colors. Use the keyword darkviolet
anywhere CSS accepts a color, or its hex code #9400D3, which is rgb(148, 0, 211) in RGB.
It is a medium, vivid cool color with a hue angle of 282° on the HSL color wheel and a perceived lightness of 52% in OKLCH. On a dark violet background, white text gives the higher contrast at 6.56:1, which passes WCAG AA for normal text.
Dark Violet color codes
| CSS name | darkviolet |
|
|---|---|---|
| HEX | #9400D3 |
|
| HEX (8-digit) | #9400D3FF |
|
| RGB | rgb(148, 0, 211) |
|
| HSL | hsl(282, 100%, 41%) |
|
| HSV / HSB | hsv(282, 100%, 83%) |
|
| OKLCH | oklch(51.5% 0.2607 309.8) |
|
| CMYK | cmyk(29.9%, 100%, 0%, 17.3%) |
Contrast with white and black
WCAG 2 contrast ratios and APCA lightness contrast (Lc) for dark violet used as text and as a background.
Tints and shades of dark violet
Tints mix dark violet with white; shades mix it with black, in 10% steps. Click a swatch to copy it, or build custom scales in the tint & shade generator.
Tints
Shades
Colors that go with dark violet
Harmonies calculated on the HSL color wheel. Explore more in the color scheme generator.
Complementary
Analogous
Triadic
Split-Complementary
Dark Violet with color blindness
Approximately how dark violet appears with each type of color vision deficiency. Test full designs with the color blindness simulator.
Using dark violet in CSS
.element {
color: darkviolet;
background-color: #9400d3;
border-color: rgb(148 0 211 / 50%);
outline-color: oklch(51.5% 0.2607 309.8);
}Similar named colors
See all shades of purple or browse every CSS color name.