CSS color names · Purples

Violet color: hex #ee82ee, RGB and HSL

Violet is the CSS keyword violet, hex #ee82ee, rgb(238, 130, 238), hsl(300, 76%, 72%). It is a light, vivid magenta in the purples family. Below: the colors that go with it, its tints and shades, how it reads as text, and a complete interface palette built from it.

CSS name
violet
Hex
#ee82ee
RGB
rgb(238, 130, 238)
HSL
hsl(300, 76%, 72%)
On white
2.32:1 — fails AA; use as a fill, not text
On black
9.06:1 — passes AA for body text
.example {
  color: violet;          /* keyword */
  color: #ee82ee;          /* hex */
  color: rgb(238, 130, 238); /* rgb */
  color: hsl(300, 76%, 72%); /* hsl */
}

What colors go with violet

Each match keeps violet's saturation and lightness and rotates only the hue, so the relationship is the wheel's and nothing else. Any of these can be an accent beside violet as the primary; the harmony guides explain which rule suits which interface.

Complementary

The opposite hue, 180° away — the strongest contrast, best kept to one accent per screen.

#82ee82

Split-complementary

The two neighbors of the complement, at 150° and 210° — most of the contrast with less tension, and two accents instead of one.

#b8ee82
#82eeb8

Triadic

Two hues at 120° and 240° — three evenly spaced signals, the scheme charts and category colors want.

#eeee82
#82eeee

Analogous

The neighbors at −30° and +30° — calm and cohesive, with emphasis coming from weight and size rather than hue.

#b882ee
#ee82b8

Tints and shades of violet

Tints add lightness toward white; shades remove it toward black. The hue and saturation stay fixed, so every step still reads as violet — these are the hover, pressed, disabled and surface variants a single brand color needs.

Tints (lighter)

#f197f1
#f4acf4
#f7c1f7
#f9d5f9
#fceafc

Shades (darker)

#e74ce7
#d81dd8
#a216a2
#6c0f6c
#360736

A UI color palette built from violet

The eight semantic roles an interface actually uses, derived from violet as the primary with the split-complementary rule: secondary and accent rotate around the wheel, and the five neutrals take the hue at lightness steps tuned for light and dark mode. This is the same derivation the palette generator runs — open it there to change the rule, drag the anchors, or export the set as CSS variables.

Light mode
primary
#ee82ee
secondary
#b8ee82
accent
#82eeb8
background
#fdfcfd
surface
#f7f3f7
text
#221122
muted
#8f568f
border
#ecdfec
Dark mode
primary
#ee82ee
secondary
#b8ee82
accent
#82eeb8
background
#1b0e1b
surface
#281528
text
#f6f3f6
muted
#b894b8
border
#492749

Using violet in an interface

Purple is the hue most SaaS products have settled on for a primary — it is distinct from the blues of links and the reds and greens of status. The slate blues and indigo make dependable primaries; the light lavenders make tinted surfaces that still read as brand. Whichever role violet takes, define it once as a token rather than repeating the keyword: the semantic palette guide covers the eight roles, and the guides to complementary, triadic and the other color schemes explain how to weight the matches above.

What is the hex code for Violet?
Violet is #ee82ee. In CSS the keyword violet, the hex #ee82ee, rgb(238, 130, 238) and hsl(300, 76%, 72%) all paint the same color.
What colors go with Violet?
Its complement is #82ee82, the split-complementary pair is #b8ee82 and #82eeb8, the triadic partners are #eeee82 and #82eeee, and the analogous neighbors are #b882ee and #ee82b8. In an interface, use Violet for most colored elements and one of these for a single accent, at roughly an 80/20 split.
What is the opposite of Violet on the color wheel?
The opposite (complementary) color is #82ee82, the same saturation and lightness rotated 180° around the HSL wheel. Complementary pairs give the strongest contrast, which is why the complement should be used sparingly rather than at equal weight.
Can I use Violet for text?
Violet as text on white has a contrast ratio of 2.32:1, which fails WCAG AA for body text (4.5:1) and for large text (3:1). On black it is 9.06:1, which passes for body text. Use it as text on dark surfaces, or as a fill with dark text on top.

Similar named colors

More purples

We'd like to use Google cookies to understand how Nodlume is used and to measure our advertising. Nothing loads until you choose, and declining does not affect anything in the app.