Violet hex and RGB values
The CSS keyword violet gives you #EE82EE, or rgb(238, 130, 238).
CSS violet is a light, vivid pink-purple for digital designs. Its RGB value describes a screen color, so it is not a specification for matching ink or physical materials.
Compare black and white text
| Text / background | Ratio | AA normal | AA large | AAA normal | AAA large |
|---|---|---|---|---|---|
| #000000 / #EE82EE | 9.06:1 | Pass | Pass | Pass | Pass |
| #FFFFFF / #EE82EE | 2.32:1 | Fail | Fail | Fail | Fail |
Black text has the higher contrast on violet: 9.06:1. The table compares both options against all four text thresholds, using the unrounded values for pass or fail.
Try violet in a layout
The CSS sample below uses black text on #EE82EE. Preview a 16 px label and a 24 px heading to compare normal and large text. Swap the colors to try violet as the text color; the ratio stays the same.
.sample {
background: #EE82EE;
color: #000000;
}Copy the exact color
Use the converter to copy HEX, RGB or HSL. If you edit in HSL, the final value is rounded to eight-bit sRGB so the preview and exported color agree. For text over an image, gradient or translucent layer, check the finished design separately.