#540CE2#540CE2

#540CE2 is a mid, highly saturated violet. Relative luminance 0.076; OKLCH L 45.9% C 0.266 H 283.1°. Best body text is #FFFFFF at 8.31:1 contrast (WCAG AA passes).

Color values

HEX#540CE2
RGBrgb(84, 12, 226)
HSLhsl(260, 90%, 47%)
HSVhsv(260, 95%, 89%)
CMYKcmyk(62.8%, 94.7%, 0%, 11.4%)
CIE-LABlab(33.22, 72.37, -89.78)
CIE-LCHlch(33.22, 115.31, 308.87°)
OKLaboklab(45.86% 0.0603 -0.2587)
OKLCHoklch(45.86% 0.266 283.1)
XYZxyz(17.5108, 7.6375, 72.4882)
Luminance0.0764 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#540CE2 #9AE20C
analogous
#0C2FE2 #540CE2 #BF0CE2
triadic
#540CE2 #E2540C #0CE254
tetradic
#540CE2 #E20C2F #9AE20C #0CE2BF
square
#540CE2 #E20C2F #9AE20C #0CE2BF
split-complementary
#540CE2 #E2BF0C #2FE20C
monochromatic
#29066E #3E09A8 #540CE2 #7737F4 #9E71F7

Accessibility & contrast

On white

8.31
#540CE2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.53
#540CE2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #540CE2
8.31:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##540CE2#FFFFFF#000000##FFFFFF
##540CE21.008.312.538.31
#FFFFFF8.311.0021.001.00
#0000002.5321.001.0021.00
##FFFFFF8.311.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0054E7
Deuteranopia (green-blind)
#0047DF
Tritanopia (blue-blind)
#005D85
Achromatopsia (no color)
#4E4E4E

Design tokens & code

CSS
--color: #540ce2;
/* rgb */ color: rgb(84, 12, 226);
/* oklch */ color: oklch(45.9% 0.266 283.1);
Tailwind
colors: {
  custom: {
    50: '#9761ed',
    500: '#540ce2',
    950: '#000000',
  },
}
SCSS
$custom: #540ce2;
$custom-light: #9761ed;
$custom-dark: #000000;
JSON
{
  "hex": "#540ce2",
  "rgb": {
    "r": 84,
    "g": 12,
    "b": 226
  },
  "hsl": {
    "h": 260.187,
    "s": 89.916,
    "l": 46.667
  },
  "oklch": {
    "l": 0.45855,
    "c": 0.26565,
    "h": 283.1
  },
  "luminance": 0.07639
}

Semantic roles & 50–950 ramp

primary
#540CE2
secondary
#B7DE6C
accent
#FF29B7
background
#FAF6FE
surface
#F4EBFD
border
#CEC6D5
text
#100617
muted
#7F7A85

Preview Lab

Preview with #540CE2

Body copy rendered with the generated semantic roles for this colour.

Preview Lab → · Contrast checker → · Palette generator →

#540CE2 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva