Home / Colors / Violet hex code

Violet hex code

A vivid blue-purple at the far end of the rainbow.

#7F00FF Violet
HEX#7F00FF
RGBrgb(127, 0, 255)
HSLhsl(270, 100%, 50%)
HSVhsv(270, 100%, 100%)
CMYKcmyk(50%, 100%, 0%, 0%)
Advertisement

About violet

A vivid blue-purple at the far end of the rainbow. Its hex code is #7F00FF, which is rgb(127, 0, 255): 127 red, 0 green and 255 blue on a scale of 0 to 255.

Other values you'll see for violet: #EE82EE (the CSS violet, a light pink-purple).

Violet is a cool color.

Violet tints and shades

Lighter tints (mixed with white) and darker shades (mixed with black) of violet. Click any of them to copy its hex code.

Colors that go with violet

Complementary

The opposite color on the color wheel, for strong contrast.

Analogous

Neighbors on the color wheel, for a calm, matching look.

Triadic

Three colors evenly spaced around the wheel, for a balanced, lively palette.

Split complementary

The two colors either side of the complement: contrast without clashing.

Text on violet

White text

6.27:1 · Passes AA for all text

Black text

3.34:1 · Large text only (AA)

For readable text, WCAG asks for a contrast ratio of at least 4.5:1 (3:1 for large text). White text is the better choice on violet. Test other combinations with the contrast checker.

Using violet in CSS

.element {
  color: #7F00FF;
  background-color: rgb(127 0 255);
  border-color: hsl(270 100% 50%);
}
Advertisement

Frequently asked questions

What is the hex code for violet?

Violet is #7F00FF. In RGB it's rgb(127, 0, 255), and in HSL it's hsl(270, 100%, 50%).

What colors go with violet?

Its complementary color is #80FF00, which gives strong contrast. For a softer look, use analogous colors #0000FF and #FE00FF. Violet also pairs well with white.

Is violet warm or cool?

Violet is a cool color.

Should I use white or black text on violet?

Use white text. Its contrast ratio on violet is 6.27:1, versus 3.34:1 for black.

Similar colors

See all popular colors · All HTML color names · Open violet in the color picker

Advertisement