100% free no uploads no sign-up

violet color code

The hex code for violet is #EE82EE, which is rgb(238, 130, 238) in RGB and cmyk(0%, 45%, 0%, 7%) in CMYK. It's a light, rich pink. It is a built-in CSS colour, so you can also write it as “violet”.

#EE82EEviolet
White text: 2.31:1 ✗Black text: 9.06:1 ✓ AANearest name: violet

Move the sliders to find a lighter, darker or softer violet; the codes update as you go.

Violet colour codes

HEX#EE82EE
RGBrgb(238, 130, 238)
HSLhsl(300, 76%, 72%)
HSV / HSBhsv(300, 45%, 93%)
CMYKcmyk(0%, 45%, 0%, 7%)
Decimal15631086
CSS keywordviolet

About violet

Violet sits at a hue of 300° on the colour wheel, with 76% saturation and 72% lightness. That makes it a colour that sits between warm and cool: greens and purples like this can be styled warm or cool depending on what you put next to them.

For text, black reads better on violet. Violet as text on a white background has a contrast ratio of 2.31:1, which fails the WCAG AA rule for body text (4.5:1) and fails the 3:1 rule for large text. On black it is 9.06:1, which passes AA for body text.

Tints and shades of violet

Tints mix violet with white and shades mix it with black, in 10% steps. They're the easiest way to get lighter backgrounds and darker hover or text colours that still match.

#FDF3FD#FCE6FC#FADAFA#F8CDF8#F7C1F7#F5B4F5#F3A8F3#F19BF1#F08FF0
violet #EE82EE
#D675D6#BE68BE#A75BA7#8F4E8F#774177#5F345F#472747#301A30#180D18

Colours that go with violet

Complementary — opposite on the colour wheel: maximum contrast

#EE82EE#82EE82

Analogous — neighbours 30° either side: calm and natural

#B882EE#EE82EE#EE82B8

Triadic — three hues 120° apart: lively but balanced

#EE82EE#EEEE82#82EEEE

Split complementary — the two neighbours of the complement: contrast with less tension

#EE82EE#B8EE82#82EEB8

Tetradic — four hues 90° apart: rich, use one as the main colour

#EE82EE#EEB882#82EE82#82B8EE

Violet text contrast

CombinationRatioAA normal (4.5:1)AA large (3:1)AAA (7:1)
violet on white2.31:1failfailfail
violet on black9.06:1passpasspass

Check violet against any other colour in the contrast checker.

How violet looks with colour blindness

Simulated with the Machado et al. (2009) model for the complete loss of one type of cone cell. Colour vision deficiency affects roughly 1 in 12 men and 1 in 200 women, most often as red-green colour blindness.

normal #EE82EEprotanopia #79A3F2deuteranopia #97AFEBtritanopia #F48DAD

Use violet in code

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

Frequently asked questions

What is the hex code for violet?

Violet is #EE82EE (lowercase #ee82ee). It's the official value of the CSS keyword “violet”.

What is violet in RGB, HSL and CMYK?

RGB: rgb(238, 130, 238). HSL: hsl(300, 76%, 72%). CMYK: cmyk(0%, 45%, 0%, 7%). CMYK is a simple conversion for reference; for professional printing, ask your printer for a matching ink or Pantone swatch.

What colours go with violet?

Its complementary colour is #82EE82 (close to light green), which gives the strongest contrast. For a calmer look, use the analogous colours #B882EE and #EE82B8, or the triadic pair #EEEE82 and #82EEEE. Tints and shades of violet itself always work together.

Is violet a warm or cool colour?

Violet has a hue of 300°, which makes it neither clearly warm nor cool.

Should I use black or white text on violet?

Black. Black text on violet has a contrast ratio of 9.06:1 and white text has 2.31:1. WCAG asks for at least 4.5:1 for normal text and 3:1 for large text.

How do I use violet in CSS?

Write color: violet; or color: #ee82ee; — both give the same colour. Named colours work in every browser.

Colours similar to violet