#B540A2#B540A2

#B540A2 is a mid, vivid purple. Relative luminance 0.161; OKLCH L 56.9% C 0.187 H 334.8°. Best body text is #FFFFFF at 4.98:1 contrast (WCAG AA passes).

Color values

HEX#B540A2
RGBrgb(181, 64, 162)
HSLhsl(310, 48%, 48%)
HSVhsv(310, 65%, 71%)
CMYKcmyk(0%, 64.6%, 10.5%, 29%)
CIE-LABlab(47.11, 58.33, -29.29)
CIE-LCHlch(47.11, 65.27, 333.34°)
OKLaboklab(56.85% 0.1695 -0.0798)
OKLCHoklch(56.85% 0.187 334.8)
XYZxyz(27.4113, 16.1014, 35.8396)
Luminance0.1610 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#B540A2 #40B553
analogous
#8E40B5 #B540A2 #B54067
triadic
#B540A2 #A2B540 #40A2B5
tetradic
#B540A2 #B58E40 #40B553 #4067B5
square
#B540A2 #B58E40 #40B553 #4067B5
split-complementary
#B540A2 #67B540 #40B58E
monochromatic
#5B2051 #88307A #B540A2 #CA68BA #DA96CF

Accessibility & contrast

On white

4.98
#B540A2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.22
#B540A2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #B540A2
4.98:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##B540A2#FFFFFF#000000##FFFFFF
##B540A21.004.984.224.98
#FFFFFF4.981.0021.001.00
#0000004.2221.001.0021.00
##FFFFFF4.981.0021.001.00

Color blindness preview

Protanopia (red-blind)
#3F65A5
Deuteranopia (green-blind)
#65769F
Tritanopia (blue-blind)
#BD486B
Achromatopsia (no color)
#707070

Design tokens & code

CSS
--color: #b540a2;
/* rgb */ color: rgb(181, 64, 162);
/* oklch */ color: oklch(56.9% 0.187 334.8);
Tailwind
colors: {
  custom: {
    50: '#ce7dbe',
    500: '#b540a2',
    950: '#000000',
  },
}
SCSS
$custom: #b540a2;
$custom-light: #ce7dbe;
$custom-dark: #000000;
JSON
{
  "hex": "#b540a2",
  "rgb": {
    "r": 181,
    "g": 64,
    "b": 162
  },
  "hsl": {
    "h": 309.744,
    "s": 47.755,
    "l": 48.039
  },
  "oklch": {
    "l": 0.56851,
    "c": 0.18735,
    "h": 334.8
  },
  "luminance": 0.16099
}

Semantic roles & 50–950 ramp

primary
#B540A2
secondary
#8BC595
accent
#D76650
background
#FDF8FB
surface
#FAEFF6
border
#D3CAD0
text
#140A12
muted
#837C81

Preview Lab

Preview with #B540A2

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

Preview Lab → · Contrast checker → · Palette generator →

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