Dark violet
Dark violet is a medium, vivid color from the purple family. Hex code #9400D3.
Color codes
- CSS name
darkviolet - HEX
#9400D3 - RGB
rgb(148 0 211) - HSL
hsl(282 100% 41%) - HSB / HSV
hsb(282, 100%, 83%) - OKLCH
oklch(51.5% 0.261 309.8) - CMYK
cmyk(30%, 100%, 0%, 17%)
White text
6.56:1 · passes WCAG AA
Black text
3.19:1 · passes WCAG AA for large text only
Shades
Complementary
Analogous
Triadic
About this color
Dark violet in CSS and design
Dark violet is a medium, vivid color from the purple family. Dark violet is one of the extended color keywords, which CSS adopted from the X11 color names used on Unix workstations.
Use it in CSS by name or by any of its codes; these all give the same color:
color: darkviolet;
color: #9400D3;
color: rgb(148 0 211);
color: hsl(282 100% 41%);For text on dark violet, white reads best. Check other combinations with the contrast checker, or browse all CSS color names.
More tools
Work with this color
- Color picker and converterPick a color and get HEX, RGB, HSL, HSB, CMYK and OKLCH, plus shades and harmonies.
- Contrast checkerCheck text and background colors against WCAG AA and AAA, and fix failing ones.
- CSS color namesAll 148 named colors with hex codes, shades, contrast and matching palettes.
- Palette generatorBuild a color palette from harmony rules, with shades and CSS variables.
Frequently asked questions
What is the hex code for dark violet?
#9400D3. In CSS you can also use the keyword darkviolet, which works in every browser.
What is dark violet in RGB and HSL?
In RGB it is rgb(148 0 211), in HSL hsl(282 100% 41%). For print, cmyk(30%, 100%, 0%, 17%) is a starting point, but CMYK depends on paper and ink, so check with your printer.
Should I use black or white text on dark violet?
White text works better: it has a contrast ratio of 6.56:1 and passes WCAG AA. Black text reaches 3.19:1.
Which colors go with dark violet?
Its complementary color is #4C7600, on the opposite side of the color wheel. For a calmer look, combine it with its analogous neighbors #5838F6 and #AE178D. The palette generator builds more combinations.