#B540D5#B540D5

#B540D5 is a mid, highly saturated purple. Relative luminance 0.183; OKLCH L 59.7% C 0.230 H 318.1°. Best body text is #000000 at 4.66:1 contrast (WCAG AA passes).

Color values

HEX#B540D5
RGBrgb(181, 64, 213)
HSLhsl(287, 64%, 54%)
HSVhsv(287, 70%, 84%)
CMYKcmyk(15%, 70%, 0%, 16.5%)
CIE-LABlab(49.85, 67.21, -54.63)
CIE-LCHlch(49.85, 86.61, 320.89°)
OKLaboklab(59.72% 0.1709 -0.1533)
OKLCHoklch(59.72% 0.23 318.1)
XYZxyz(32.8980, 18.2961, 64.7365)
Luminance0.1830 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#B540D5 #60D540
analogous
#6B40D5 #B540D5 #D540AB
triadic
#B540D5 #D5B540 #40D5B5
tetradic
#B540D5 #D56B40 #60D540 #40ABD5
square
#B540D5 #D56B40 #60D540 #40ABD5
split-complementary
#B540D5 #ABD540 #40D56B
monochromatic
#6A1C7F #9327B1 #B540D5 #C872E0 #DCA4EB

Accessibility & contrast

On white

4.51
#B540D5 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.66
#B540D5 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#000000 on #B540D5
4.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##B540D5#FFFFFF#000000##000000
##B540D51.004.514.664.66
#FFFFFF4.511.0021.0021.00
#0000004.6621.001.001.00
##0000004.6621.001.001.00

Color blindness preview

Protanopia (red-blind)
#006FD9
Deuteranopia (green-blind)
#477AD2
Tritanopia (blue-blind)
#B45D86
Achromatopsia (no color)
#777777

Design tokens & code

CSS
--color: #b540d5;
/* rgb */ color: rgb(181, 64, 213);
/* oklch */ color: oklch(59.7% 0.230 318.1);
Tailwind
colors: {
  custom: {
    50: '#cf7fe3',
    500: '#b540d5',
    950: '#000000',
  },
}
SCSS
$custom: #b540d5;
$custom-light: #cf7fe3;
$custom-dark: #000000;
JSON
{
  "hex": "#b540d5",
  "rgb": {
    "r": 181,
    "g": 64,
    "b": 213
  },
  "hsl": {
    "h": 287.114,
    "s": 63.948,
    "l": 54.314
  },
  "oklch": {
    "l": 0.59719,
    "c": 0.22957,
    "h": 318.1
  },
  "luminance": 0.18295
}

Semantic roles & 50–950 ramp

primary
#B540D5
secondary
#A6D899
accent
#E74165
background
#FDF8FE
surface
#FAEFFC
border
#D3CAD5
text
#140B15
muted
#837C84

Preview Lab

Preview with #B540D5

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

Preview Lab → · Contrast checker → · Palette generator →

#B540D5 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva