Skip to content
Color Codes

CSS named color

Violet Color Code

Violet is a light, vivid magenta with the hex code #EE82EE. In RGB it is rgb(238, 130, 238), in HSL hsl(300, 76%, 72%) and in CMYK cmyk(0%, 45%, 0%, 7%).

Violet
#EE82EE

Color values

In CSS you can write it as the keyword violet.

White text on Violet has a contrast ratio of 2.32:1 and black text 9.06:1, so black text is the more readable choice.

The closest Tailwind CSS color is Fuchsia 400 (#E879F9).

Use Violet in CSS

.element {
  color: violet;
  background-color: #ee82ee;
  border-color: rgb(238, 130, 238);
}

Tints and shades of Violet

Ten steps from light to dark at the same hue. Click any swatch to copy it.

Colors that go with Violet

Color-wheel harmonies built from #EE82EE. Click a swatch to copy it or open the set in the color wheel.

Complementary

Open in color wheel

Opposite hues for maximum contrast and energetic accents.

Neighboring hues for calm, cohesive surfaces.

Three evenly spaced hues for balanced, colorful systems.

Split complementary

Open in color wheel

A base plus the two neighbors of its complement — contrast with less tension.

Text contrast on Violet

Aa
White text
2.32:1
Fail
Aa
Black text
9.06:1
AAA
Check in the contrast checker

Colors similar to Violet

Palettes with similar colors

Questions about Violet

What is the hex code for Violet?

The hex code for Violet is #EE82EE. Its RGB value is rgb(238, 130, 238) and its HSL value is hsl(300, 76%, 72%).

What colors go with Violet?

The complementary color of Violet is #81EE81. For a softer scheme try the analogous colors #B881EE and #EE81B8; for a balanced three-color scheme use the triadic colors #EEEE81 and #81EEEE.

Is Violet readable as a text color?

On a white background Violet has a contrast ratio of 2.32:1, which does not pass WCAG AA for normal text (4.5:1). On black it reaches 9.06:1.

More purple colors