#B040A2#B040A2

#B040A2 is a mid, vivid purple. Relative luminance 0.155; OKLCH L 56.1% C 0.184 H 333.0°. Best body text is #FFFFFF at 5.12:1 contrast (WCAG AA passes).

Color values

HEX#B040A2
RGBrgb(176, 64, 162)
HSLhsl(308, 47%, 47%)
HSVhsv(308, 64%, 69%)
CMYKcmyk(0%, 63.6%, 8%, 31%)
CIE-LABlab(46.32, 57.02, -30.57)
CIE-LCHlch(46.32, 64.70, 331.80°)
OKLaboklab(56.13% 0.1642 -0.0836)
OKLCHoklch(56.13% 0.184 333)
XYZxyz(26.2595, 15.5075, 35.7856)
Luminance0.1551 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#B040A2 #40B04E
analogous
#8640B0 #B040A2 #B0406A
triadic
#B040A2 #A2B040 #40A2B0
tetradic
#B040A2 #B08640 #40B04E #406AB0
square
#B040A2 #B08640 #40B04E #406AB0
split-complementary
#B040A2 #6AB040 #40B086
monochromatic
#561F4F #833079 #B040A2 #C766BB #D893CF

Accessibility & contrast

On white

5.12
#B040A2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.10
#B040A2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #B040A2
5.12:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##B040A2#FFFFFF#000000##FFFFFF
##B040A21.005.124.105.12
#FFFFFF5.121.0021.001.00
#0000004.1021.001.0021.00
##FFFFFF5.121.0021.001.00

Color blindness preview

Protanopia (red-blind)
#3D63A5
Deuteranopia (green-blind)
#62749F
Tritanopia (blue-blind)
#B8496B
Achromatopsia (no color)
#6E6E6E

Design tokens & code

CSS
--color: #b040a2;
/* rgb */ color: rgb(176, 64, 162);
/* oklch */ color: oklch(56.1% 0.184 333.0);
Tailwind
colors: {
  custom: {
    50: '#cb7dbe',
    500: '#b040a2',
    950: '#000000',
  },
}
SCSS
$custom: #b040a2;
$custom-light: #cb7dbe;
$custom-dark: #000000;
JSON
{
  "hex": "#b040a2",
  "rgb": {
    "r": 176,
    "g": 64,
    "b": 162
  },
  "hsl": {
    "h": 307.5,
    "s": 46.667,
    "l": 47.059
  },
  "oklch": {
    "l": 0.56125,
    "c": 0.18422,
    "h": 333
  },
  "luminance": 0.15506
}

Semantic roles & 50–950 ramp

primary
#B040A2
secondary
#89C390
accent
#D66251
background
#FCF7FB
surface
#F9EEF6
border
#D2C9D0
text
#140A12
muted
#827C81

Preview Lab

Preview with #B040A2

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

Preview Lab → · Contrast checker → · Palette generator →

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