#B040D2#B040D2

#B040D2 is a mid, highly saturated purple. Relative luminance 0.175; OKLCH L 58.9% C 0.225 H 317.2°. Best body text is #FFFFFF at 4.66:1 contrast (WCAG AA passes).

Color values

HEX#B040D2
RGBrgb(176, 64, 210)
HSLhsl(286, 62%, 54%)
HSVhsv(286, 70%, 82%)
CMYKcmyk(16.2%, 69.5%, 0%, 17.6%)
CIE-LABlab(48.95, 65.59, -54.41)
CIE-LCHlch(48.95, 85.22, 320.32°)
OKLaboklab(58.87% 0.1651 -0.1528)
OKLCHoklch(58.87% 0.225 317.2)
XYZxyz(31.3690, 17.5513, 62.6956)
Luminance0.1755 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#B040D2 #62D240
analogous
#6740D2 #B040D2 #D240AB
triadic
#B040D2 #D2B040 #40D2B0
tetradic
#B040D2 #D26740 #62D240 #40ABD2
square
#B040D2 #D26740 #62D240 #40ABD2
split-complementary
#B040D2 #ABD240 #40D267
monochromatic
#651D7B #8E29AC #B040D2 #C472DE #D9A3E9

Accessibility & contrast

On white

4.66
#B040D2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.51
#B040D2 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#FFFFFF on #B040D2
4.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##B040D2#FFFFFF#000000##FFFFFF
##B040D21.004.664.514.66
#FFFFFF4.661.0021.001.00
#0000004.5121.001.0021.00
##FFFFFF4.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006DD6
Deuteranopia (green-blind)
#4378CF
Tritanopia (blue-blind)
#AE5D85
Achromatopsia (no color)
#747474

Design tokens & code

CSS
--color: #b040d2;
/* rgb */ color: rgb(176, 64, 210);
/* oklch */ color: oklch(58.9% 0.225 317.2);
Tailwind
colors: {
  custom: {
    50: '#cc7ee0',
    500: '#b040d2',
    950: '#000000',
  },
}
SCSS
$custom: #b040d2;
$custom-light: #cc7ee0;
$custom-dark: #000000;
JSON
{
  "hex": "#b040d2",
  "rgb": {
    "r": 176,
    "g": 64,
    "b": 210
  },
  "hsl": {
    "h": 286.027,
    "s": 61.864,
    "l": 53.725
  },
  "oklch": {
    "l": 0.58866,
    "c": 0.22499,
    "h": 317.2
  },
  "luminance": 0.1755
}

Semantic roles & 50–950 ramp

primary
#B040D2
secondary
#A6D698
accent
#E54369
background
#FDF8FD
surface
#FAEFFB
border
#D3CAD4
text
#140B15
muted
#837C83

Preview Lab

Preview with #B040D2

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

Preview Lab → · Contrast checker → · Palette generator →

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