#B040A6#B040A6

#B040A6 is a mid, vivid purple. Relative luminance 0.157; OKLCH L 56.3% C 0.187 H 331.5°. Best body text is #FFFFFF at 5.08:1 contrast (WCAG AA passes).

Color values

HEX#B040A6
RGBrgb(176, 64, 166)
HSLhsl(305, 47%, 47%)
HSVhsv(305, 64%, 69%)
CMYKcmyk(0%, 63.6%, 5.7%, 31%)
CIE-LABlab(46.51, 57.68, -32.64)
CIE-LCHlch(46.51, 66.27, 330.49°)
OKLaboklab(56.33% 0.1646 -0.0895)
OKLCHoklch(56.33% 0.187 331.5)
XYZxyz(26.6208, 15.6520, 37.6880)
Luminance0.1565 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#B040A6 #40B04A
analogous
#8240B0 #B040A6 #B0406E
triadic
#B040A6 #A6B040 #40A6B0
tetradic
#B040A6 #B08240 #40B04A #406EB0
square
#B040A6 #B08240 #40B04A #406EB0
split-complementary
#B040A6 #6EB040 #40B082
monochromatic
#561F51 #83307C #B040A6 #C766BF #D893D1

Accessibility & contrast

On white

5.08
#B040A6 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.13
#B040A6 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #B040A6
5.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##B040A6#FFFFFF#000000##FFFFFF
##B040A61.005.084.135.08
#FFFFFF5.081.0021.001.00
#0000004.1321.001.0021.00
##FFFFFF5.081.0021.001.00

Color blindness preview

Protanopia (red-blind)
#3A64A9
Deuteranopia (green-blind)
#6074A3
Tritanopia (blue-blind)
#B74B6D
Achromatopsia (no color)
#6E6E6E

Design tokens & code

CSS
--color: #b040a6;
/* rgb */ color: rgb(176, 64, 166);
/* oklch */ color: oklch(56.3% 0.187 331.5);
Tailwind
colors: {
  custom: {
    50: '#cb7dc1',
    500: '#b040a6',
    950: '#000000',
  },
}
SCSS
$custom: #b040a6;
$custom-light: #cb7dc1;
$custom-dark: #000000;
JSON
{
  "hex": "#b040a6",
  "rgb": {
    "r": 176,
    "g": 64,
    "b": 166
  },
  "hsl": {
    "h": 305.357,
    "s": 46.667,
    "l": 47.059
  },
  "oklch": {
    "l": 0.56328,
    "c": 0.18738,
    "h": 331.5
  },
  "luminance": 0.1565
}

Semantic roles & 50–950 ramp

primary
#B040A6
secondary
#89C38E
accent
#D65D51
background
#FCF7FB
surface
#F9EEF7
border
#D2C9D0
text
#140A12
muted
#827C81

Preview Lab

Preview with #B040A6

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

Preview Lab → · Contrast checker → · Palette generator →

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