CSS named color

BlueViolet #8A2BE2

blueviolet rgb(138, 43, 226)

BlueViolet is a violet with the hex code #8A2BE2, which converts to rgb(138, 43, 226). Open #8A2BE2 in the converter to tweak it.

BlueViolet color values

HEX#8A2BE2
HEX (shorthand)—
RGBrgb(138, 43, 226)
RGBArgba(138, 43, 226, 1)
8-digit HEX#8A2BE2FF
HSLhsl(271, 76%, 53%)
HSV / HSB271°, 81%, 89%
CMYK39%, 81%, 0%, 11%
RGB 0–10.541, 0.169, 0.886
Decimal9055202
CSS keywordblueviolet

How #8A2BE2 converts to RGB

Split the hex code into three pairs and read each pair as a base-16 number: 8A → 138, 2B → 43, E2 → 226. That gives rgb(138, 43, 226). The step-by-step guide explains the math.

Shades of BlueViolet

Mixed toward black in 10% steps. Click a swatch to copy its hex.

Tints of BlueViolet

Mixed toward white in 10% steps.

Color harmonies

Hue rotations of BlueViolet on the HSL color wheel, keeping saturation and lightness fixed. The color harmony guide explains when each scheme works.

Complementary

Analogous

Split-complementary

Triadic

Tetradic (square)

Contrast and accessibility

TextBackgroundRatioWCAG 2.x
White BlueViolet 5.95:1AA
Black BlueViolet 3.52:1AA Large only

Use white text on a blueviolet background. Test any other pair in the contrast checker; thresholds are explained in the WCAG contrast guide.

Use BlueViolet in CSS

.element {
  color: blueviolet;                         /* keyword */
  background-color: #8A2BE2;            /* hex */
  border-color: rgb(138 43 226 / 50%);    /* 50% transparent */
}

Need it semi-transparent? Append an alpha byte: #8A2BE280 is BlueViolet at 50% opacity. See RGBA & transparency.

Similar named colors

FAQ

What is the HEX code for BlueViolet?

The CSS named color blueviolet is #8A2BE2 in hexadecimal. In CSS you can write color: blueviolet; or color: #8A2BE2; — both produce the same pixel.

What is BlueViolet in RGB?

BlueViolet is rgb(138, 43, 226): red 138, green 43, blue 226 on the 0–255 scale. As normalized 0–1 floats that is (0.541, 0.169, 0.886).

Is white or black text more readable on BlueViolet?

White text is more readable. White on #8A2BE2 has a contrast ratio of 5.95:1 (AA), black on #8A2BE2 has 3.52:1 (AA Large only). WCAG AA needs 4.5:1 for normal text.

Copied!