#B040B5#B040B5

#B040B5 is a mid, vivid purple. Relative luminance 0.162; OKLCH L 57.1% C 0.200 H 326.0°. Best body text is #FFFFFF at 4.95:1 contrast (WCAG AA passes).

Color values

HEX#B040B5
RGBrgb(176, 64, 181)
HSLhsl(297, 48%, 48%)
HSVhsv(297, 65%, 71%)
CMYKcmyk(2.8%, 64.6%, 0%, 29%)
CIE-LABlab(47.28, 60.24, -40.27)
CIE-LCHlch(47.28, 72.46, 326.24°)
OKLaboklab(57.13% 0.1657 -0.1116)
OKLCHoklch(57.13% 0.2 326)
XYZxyz(28.0778, 16.2349, 45.3618)
Luminance0.1623 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#B040B5 #45B540
analogous
#7540B5 #B040B5 #B5407F
triadic
#B040B5 #B5B040 #40B5B0
tetradic
#B040B5 #B57540 #45B540 #407FB5
square
#B040B5 #B57540 #45B540 #407FB5
split-complementary
#B040B5 #7FB540 #40B575
monochromatic
#58205B #843088 #B040B5 #C668CA #D796DA

Accessibility & contrast

On white

4.95
#B040B5 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.25
#B040B5 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #B040B5
4.95:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##B040B5#FFFFFF#000000##FFFFFF
##B040B51.004.954.254.95
#FFFFFF4.951.0021.001.00
#0000004.2521.001.0021.00
##FFFFFF4.951.0021.001.00

Color blindness preview

Protanopia (red-blind)
#2C67B8
Deuteranopia (green-blind)
#5875B2
Tritanopia (blue-blind)
#B45175
Achromatopsia (no color)
#707070

Design tokens & code

CSS
--color: #b040b5;
/* rgb */ color: rgb(176, 64, 181);
/* oklch */ color: oklch(57.1% 0.200 326.0);
Tailwind
colors: {
  custom: {
    50: '#cb7dcb',
    500: '#b040b5',
    950: '#000000',
  },
}
SCSS
$custom: #b040b5;
$custom-light: #cb7dcb;
$custom-dark: #000000;
JSON
{
  "hex": "#b040b5",
  "rgb": {
    "r": 176,
    "g": 64,
    "b": 181
  },
  "hsl": {
    "h": 297.436,
    "s": 47.755,
    "l": 48.039
  },
  "oklch": {
    "l": 0.57133,
    "c": 0.19973,
    "h": 326
  },
  "luminance": 0.16233
}

Semantic roles & 50–950 ramp

primary
#B040B5
secondary
#8EC58B
accent
#D75056
background
#FCF8FC
surface
#F9EFF9
border
#D2CAD2
text
#140A13
muted
#827C82

Preview Lab

Preview with #B040B5

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

Preview Lab → · Contrast checker → · Palette generator →

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