dark violet color code
The hex code for dark violet is #9400D3, which is rgb(148, 0, 211) in RGB and cmyk(30%, 100%, 0%, 17%) in CMYK. It's a medium, vivid purple. It is a built-in CSS colour, so you can also write it as “darkviolet”.
Build a full palette from it: open in the palette generator.
Move the sliders to find a lighter, darker or softer dark violet; the codes update as you go.
Dark Violet colour codes
| HEX | #9400D3 |
|---|---|
| RGB | rgb(148, 0, 211) |
| HSL | hsl(282, 100%, 41%) |
| HSV / HSB | hsv(282, 100%, 83%) |
| CMYK | cmyk(30%, 100%, 0%, 17%) |
| Decimal | 9699539 |
| CSS keyword | darkviolet |
About dark violet
Dark Violet sits at a hue of 282° on the colour wheel, with 100% saturation and 41% lightness. That makes it a colour that sits between warm and cool: greens and purples like this can be styled warm or cool depending on what you put next to them.
For text, white reads better on dark violet. Dark Violet as text on a white background has a contrast ratio of 6.56:1, which passes the WCAG AA rule for body text (4.5:1). On black it is 3.19:1, which fails AA for body text.
Tints and shades of dark violet
Tints mix dark violet with white and shades mix it with black, in 10% steps. They're the easiest way to get lighter backgrounds and darker hover or text colours that still match.
Colours that go with dark violet
Complementary — opposite on the colour wheel: maximum contrast
Analogous — neighbours 30° either side: calm and natural
Triadic — three hues 120° apart: lively but balanced
Split complementary — the two neighbours of the complement: contrast with less tension
Tetradic — four hues 90° apart: rich, use one as the main colour
Dark Violet text contrast
| Combination | Ratio | AA normal (4.5:1) | AA large (3:1) | AAA (7:1) |
|---|---|---|---|---|
| dark violet on white | 6.56:1 | pass | pass | fail |
| dark violet on black | 3.19:1 | fail | pass | fail |
Check dark violet against any other colour in the contrast checker.
How dark violet looks with colour blindness
Simulated with the Machado et al. (2009) model for the complete loss of one type of cone cell. Colour vision deficiency affects roughly 1 in 12 men and 1 in 200 women, most often as red-green colour blindness.
Use dark violet in code
.dark-violet {
color: darkviolet;
background-color: #9400d3;
border-color: rgb(148, 0, 211);
}Frequently asked questions
What is the hex code for dark violet?
Dark Violet is #9400D3 (lowercase #9400d3). It's the official value of the CSS keyword “darkviolet”.
What is dark violet in RGB, HSL and CMYK?
RGB: rgb(148, 0, 211). HSL: hsl(282, 100%, 41%). CMYK: cmyk(30%, 100%, 0%, 17%). CMYK is a simple conversion for reference; for professional printing, ask your printer for a matching ink or Pantone swatch.
What colours go with dark violet?
Its complementary colour is #3FD300 (close to lime green), which gives the strongest contrast. For a calmer look, use the analogous colours #2A00D3 and #D300A9, or the triadic pair #D39400 and #00D394. Tints and shades of dark violet itself always work together.
Is dark violet a warm or cool colour?
Dark Violet has a hue of 282°, which makes it neither clearly warm nor cool.
Should I use black or white text on dark violet?
White. Black text on dark violet has a contrast ratio of 3.19:1 and white text has 6.56:1. WCAG asks for at least 4.5:1 for normal text and 3:1 for large text.
How do I use dark violet in CSS?
Write color: darkviolet; or color: #9400d3; — both give the same colour. Named colours work in every browser.