#B540B2#B540B2

#B540B2 is a mid, vivid purple. Relative luminance 0.167; OKLCH L 57.7% C 0.200 H 328.8°. Best body text is #FFFFFF at 4.84:1 contrast (WCAG AA passes).

Color values

HEX#B540B2
RGBrgb(181, 64, 178)
HSLhsl(302, 48%, 48%)
HSVhsv(302, 65%, 71%)
CMYKcmyk(0%, 64.6%, 1.7%, 29%)
CIE-LABlab(47.89, 60.93, -37.50)
CIE-LCHlch(47.89, 71.55, 328.39°)
OKLaboklab(57.67% 0.1711 -0.1034)
OKLCHoklch(57.67% 0.2 328.8)
XYZxyz(28.9250, 16.7069, 43.8121)
Luminance0.1671 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#B540B2 #40B543
analogous
#7D40B5 #B540B2 #B54078
triadic
#B540B2 #B2B540 #40B2B5
tetradic
#B540B2 #B57D40 #40B543 #4078B5
square
#B540B2 #B57D40 #40B543 #4078B5
split-complementary
#B540B2 #78B540 #40B57D
monochromatic
#5B2059 #883086 #B540B2 #CA68C7 #DA96D8

Accessibility & contrast

On white

4.84
#B540B2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.34
#B540B2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #B540B2
4.84:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##B540B2#FFFFFF#000000##FFFFFF
##B540B21.004.844.344.84
#FFFFFF4.841.0021.001.00
#0000004.3421.001.0021.00
##FFFFFF4.841.0021.001.00

Color blindness preview

Protanopia (red-blind)
#3368B5
Deuteranopia (green-blind)
#5E77AF
Tritanopia (blue-blind)
#BB4F73
Achromatopsia (no color)
#727272

Design tokens & code

CSS
--color: #b540b2;
/* rgb */ color: rgb(181, 64, 178);
/* oklch */ color: oklch(57.7% 0.200 328.8);
Tailwind
colors: {
  custom: {
    50: '#ce7ec9',
    500: '#b540b2',
    950: '#000000',
  },
}
SCSS
$custom: #b540b2;
$custom-light: #ce7ec9;
$custom-dark: #000000;
JSON
{
  "hex": "#b540b2",
  "rgb": {
    "r": 181,
    "g": 64,
    "b": 178
  },
  "hsl": {
    "h": 301.538,
    "s": 47.755,
    "l": 48.039
  },
  "oklch": {
    "l": 0.57673,
    "c": 0.1999,
    "h": 328.8
  },
  "luminance": 0.16705
}

Semantic roles & 50–950 ramp

primary
#B540B2
secondary
#8BC58D
accent
#D75450
background
#FDF8FC
surface
#FAEFF8
border
#D3CAD1
text
#140A13
muted
#837C82

Preview Lab

Preview with #B540B2

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

Preview Lab → · Contrast checker → · Palette generator →

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