CSS named color

DarkViolet #9400D3

darkviolet rgb(148, 0, 211)

DarkViolet is a vivid purple with the hex code #9400D3, which converts to rgb(148, 0, 211). Open #9400D3 in the converter to tweak it.

DarkViolet color values

HEX#9400D3
HEX (shorthand)—
RGBrgb(148, 0, 211)
RGBArgba(148, 0, 211, 1)
8-digit HEX#9400D3FF
HSLhsl(282, 100%, 41%)
HSV / HSB282°, 100%, 83%
CMYK30%, 100%, 0%, 17%
RGB 0–10.58, 0, 0.827
Decimal9699539
CSS keyworddarkviolet

How #9400D3 converts to RGB

Split the hex code into three pairs and read each pair as a base-16 number: 94 → 148, 00 → 0, D3 → 211. That gives rgb(148, 0, 211). The step-by-step guide explains the math.

Shades of DarkViolet

Mixed toward black in 10% steps. Click a swatch to copy its hex.

Tints of DarkViolet

Mixed toward white in 10% steps.

Color harmonies

Hue rotations of DarkViolet on the HSL color wheel, keeping saturation and lightness fixed. The color harmony guide explains when each scheme works.

Complementary

Analogous

Split-complementary

Triadic

Tetradic (square)

Contrast and accessibility

TextBackgroundRatioWCAG 2.x
White DarkViolet 6.56:1AA
Black DarkViolet 3.19:1AA Large only

Use white text on a darkviolet background. Test any other pair in the contrast checker; thresholds are explained in the WCAG contrast guide.

Use DarkViolet in CSS

.element {
  color: darkviolet;                         /* keyword */
  background-color: #9400D3;            /* hex */
  border-color: rgb(148 0 211 / 50%);    /* 50% transparent */
}

Need it semi-transparent? Append an alpha byte: #9400D380 is DarkViolet at 50% opacity. See RGBA & transparency.

Similar named colors

FAQ

What is the HEX code for DarkViolet?

The CSS named color darkviolet is #9400D3 in hexadecimal. In CSS you can write color: darkviolet; or color: #9400D3; — both produce the same pixel.

What is DarkViolet in RGB?

DarkViolet is rgb(148, 0, 211): red 148, green 0, blue 211 on the 0–255 scale. As normalized 0–1 floats that is (0.58, 0, 0.827).

Is white or black text more readable on DarkViolet?

White text is more readable. White on #9400D3 has a contrast ratio of 6.56:1 (AA), black on #9400D3 has 3.19:1 (AA Large only). WCAG AA needs 4.5:1 for normal text.

Copied!