Violet Hex Code #EE82EE
Violet is a light, moderate purple with the hex code #EE82EE. In RGB it is 238, 130, 238, and in HSL it is 300°, 76%, 72%. It is one of the 148 named colors in CSS, so you can write “violet” instead of the hex code.
- HEX
- #EE82EE
- RGB
- rgb(238, 130, 238)
- HSL
- hsl(300, 76%, 72%)
- HSV
- hsv(300°, 45%, 93%)
- CMYK
- cmyk(0%, 45%, 0%, 7%)
- CSS name
- violet
CMYK is a simple screen-to-print estimate. Real print results depend on the printer and paper.
About Violet
On a white background Violet has a contrast ratio of 2.32:1 (Fail), and on black 9.06:1 (AAA). Black text is the better choice on top of it.
It sits between the warm and cool halves of the color wheel, so it pairs comfortably with either.
Purple combines the calm of blue with the energy of red. It reads as creative and premium, and is often used by design, media and beauty brands.
Good to know: CSS violet (#ee82ee) is a light, pinkish purple, much paler than the deep violet at the end of the rainbow. For deeper violets, see blueviolet (#8a2be2) and darkviolet (#9400d3).
Shades and tints of Violet
Tints mix Violet with white and shades mix it with black, in steps of 20%. Select a swatch to copy its hex code.
Color harmonies for Violet
These schemes are calculated from Violet on the RGB (screen) color wheel. Select a swatch to copy it, or open any scheme in the color wheel to adjust it.
On the artist’s RYB wheel, the complement of Violet is #CEEE82, close to the named color Khaki.
Violet contrast and accessibility
WCAG asks for a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (AA), and 7:1 and 4.5:1 for AAA. This is how Violet scores against white and black.
| Against | Ratio | AA normal | AA large | AAA normal | AAA large |
|---|---|---|---|---|---|
| White (#ffffff) | 2.32:1 | ✕ Fail | ✕ Fail | ✕ Fail | ✕ Fail |
| Black (#000000) | 9.06:1 | ✓ Pass | ✓ Pass | ✓ Pass | ✓ Pass |
Violet and color blindness
These are approximate previews of how Violet can look with the main types of color vision deficiency.
Violet changes noticeably.
Violet changes noticeably.
Violet changes noticeably.
Violet changes noticeably.
Gradients with Violet
Three ready-made starting points. Copy the CSS, or open one in the generator to edit the stops and check contrast.
Violet to a lighter tint
background: linear-gradient(135deg, #ee82ee 0%, #f8cdf8 100%); Violet to its analogous neighbour
background: linear-gradient(135deg, #ee82ee 0%, #ee82b8 100%); Violet to its complement
background: linear-gradient(135deg, #ee82ee 0%, #82ee82 100%); Colors similar to Violet
How each close match differs from Violet.
Use Violet in code
.element {
color: #ee82ee;
background-color: #ee82ee;
border-color: violet; /* violet is a valid CSS color name */
} :root {
--color-violet: #ee82ee;
} <!-- Tailwind arbitrary values -->
<div class="bg-[#ee82ee] text-[#ee82ee] border-[#ee82ee]"></div>
/* Tailwind v4 theme color */
@theme {
--color-violet: #ee82ee;
} Violet questions
What is the hex code for Violet?
The hex code for Violet is #EE82EE. In RGB that is rgb(238, 130, 238), and in HSL it is hsl(300, 76%, 72%).
What is the complementary color of Violet?
On the RGB (screen) color wheel, the complement of Violet is #82EE82, which is close to Pale Green. On the artist’s RYB wheel it is #CEEE82, close to Khaki.
Should I use white or black text on Violet?
Black text. It has a contrast ratio of 9.06:1 against Violet, which is WCAG AAA. The other option scores 2.32:1.
Is Violet accessible as a text color on white?
No. Violet on white scores 2.32:1, which is below the WCAG minimum of 3:1 even for large text.
What are darker and lighter shades of Violet?
Mixing Violet with black gives #BE68BE, #8F4E8F, #5F345F, #301A30 (20% to 80% black). Mixing it with white gives #F19BF1, #F5B4F5, #F8CDF8, #FCE6FC (20% to 80% white).