Free Accessible CSS Gradient Generator

← All Colors
#9400D3 Dark Violet

Dark Violet Hex Code #9400D3

Dark Violet is a dark, vivid purple with the hex code #9400D3. In RGB it is 148, 0, 211, and in HSL it is 282°, 100%, 41%. It is one of the 148 named colors in CSS, so you can write “darkviolet” instead of the hex code.

HEX
#9400D3
RGB
rgb(148, 0, 211)
HSL
hsl(282, 100%, 41%)
HSV
hsv(282°, 100%, 83%)
CMYK
cmyk(30%, 100%, 0%, 17%)
CSS name
darkviolet

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

About Dark Violet

On a white background Dark Violet has a contrast ratio of 6.56:1 (AA), and on black 3.20:1 (AA Large). 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 Violet

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

Color harmonies for Dark Violet

These schemes are calculated from Dark Violet 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 Violet is #C1D300, close to the named color Yellow Green.

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

Contrast of Dark Violet with white and black
AgainstRatioAA normalAA largeAAA normalAAA large
White (#ffffff) 6.56:1 ✓ Pass ✓ Pass ✕ Fail ✓ Pass
Black (#000000) 3.20:1 ✕ Fail ✓ Pass ✕ Fail ✕ Fail
Aa White text on Dark Violet6.56:1
Aa Black text on Dark Violet3.20:1

Dark Violet and color blindness

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

Protanopia #0058D8

Dark Violet changes noticeably.

Deuteranopia #005FD0

Dark Violet changes noticeably.

Tritanopia #8A4C7B

Dark Violet changes noticeably.

Achromatopsia #5D5D5D

Dark Violet changes noticeably.

Gradients with Dark Violet

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

Dark Violet to a lighter tint

background: linear-gradient(135deg, #9400d3 0%, #d499ed 100%);

Dark Violet to its analogous neighbour

background: linear-gradient(135deg, #9400d3 0%, #d300a9 100%);

Dark Violet to its complement

background: linear-gradient(135deg, #9400d3 0%, #3fd300 100%);

Colors similar to Dark Violet

How each close match differs from Dark Violet.

More purple colors →

Use Dark Violet in code

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

/* Tailwind v4 theme color */
@theme {
  --color-dark-violet: #9400d3;
}

Dark Violet questions

What is the hex code for Dark Violet?

The hex code for Dark Violet is #9400D3. In RGB that is rgb(148, 0, 211), and in HSL it is hsl(282, 100%, 41%).

What is the complementary color of Dark Violet?

On the RGB (screen) color wheel, the complement of Dark Violet is #3FD300, which is close to Lime Green. On the artist’s RYB wheel it is #C1D300, close to Yellow Green.

Should I use white or black text on Dark Violet?

White text. It has a contrast ratio of 6.56:1 against Dark Violet, which is WCAG AA. The other option scores 3.20:1.

Is Dark Violet accessible as a text color on white?

Yes. Dark Violet on white scores 6.56:1, which passes WCAG AA for normal text (4.5:1).

What are darker and lighter shades of Dark Violet?

Mixing Dark Violet with black gives #7600A9, #59007F, #3B0054, #1E002A (20% to 80% black). Mixing it with white gives #A933DC, #BF66E5, #D499ED, #EACCF6 (20% to 80% white).

More color tools