#B040B2#B040B2

#B040B2 is a mid, vivid purple. Relative luminance 0.161; OKLCH L 57.0% C 0.197 H 327.1°. Best body text is #FFFFFF at 4.97:1 contrast (WCAG AA passes).

Color values

HEX#B040B2
RGBrgb(176, 64, 178)
HSLhsl(299, 47%, 47%)
HSVhsv(299, 64%, 70%)
CMYKcmyk(1.1%, 64%, 0%, 30.2%)
CIE-LABlab(47.12, 59.71, -38.76)
CIE-LCHlch(47.12, 71.19, 327.01°)
OKLaboklab(56.97% 0.1655 -0.1072)
OKLCHoklch(56.97% 0.197 327.1)
XYZxyz(27.7733, 16.1131, 43.7581)
Luminance0.1611 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#B040B2 #42B240
analogous
#7740B2 #B040B2 #B2407B
triadic
#B040B2 #B2B040 #40B2B0
tetradic
#B040B2 #B27740 #42B240 #407BB2
square
#B040B2 #B27740 #42B240 #407BB2
split-complementary
#B040B2 #7BB240 #40B277
monochromatic
#572058 #833085 #B040B2 #C767C8 #D794D8

Accessibility & contrast

On white

4.97
#B040B2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

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

Best text color

#FFFFFF on #B040B2
4.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##B040B2#FFFFFF#000000##FFFFFF
##B040B21.004.974.224.97
#FFFFFF4.971.0021.001.00
#0000004.2221.001.0021.00
##FFFFFF4.971.0021.001.00

Color blindness preview

Protanopia (red-blind)
#2F66B5
Deuteranopia (green-blind)
#5A75AF
Tritanopia (blue-blind)
#B55073
Achromatopsia (no color)
#707070

Design tokens & code

CSS
--color: #b040b2;
/* rgb */ color: rgb(176, 64, 178);
/* oklch */ color: oklch(57.0% 0.197 327.1);
Tailwind
colors: {
  custom: {
    50: '#cb7dc9',
    500: '#b040b2',
    950: '#000000',
  },
}
SCSS
$custom: #b040b2;
$custom-light: #cb7dc9;
$custom-dark: #000000;
JSON
{
  "hex": "#b040b2",
  "rgb": {
    "r": 176,
    "g": 64,
    "b": 178
  },
  "hsl": {
    "h": 298.947,
    "s": 47.107,
    "l": 47.451
  },
  "oklch": {
    "l": 0.56966,
    "c": 0.1972,
    "h": 327.1
  },
  "luminance": 0.16111
}

Semantic roles & 50–950 ramp

primary
#B040B2
secondary
#8BC48A
accent
#D75153
background
#FCF8FC
surface
#F9EFF8
border
#D2CAD1
text
#140A13
muted
#827C82

Preview Lab

Preview with #B040B2

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

Preview Lab → · Contrast checker → · Palette generator →

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