#B040D8#B040D8

#B040D8 is a mid, highly saturated purple. Relative luminance 0.179; OKLCH L 59.3% C 0.230 H 315.6°. Best body text is #FFFFFF at 4.59:1 contrast (WCAG AA passes).

Color values

HEX#B040D8
RGBrgb(176, 64, 216)
HSLhsl(284, 66%, 55%)
HSVhsv(284, 70%, 85%)
CMYKcmyk(18.5%, 70.4%, 0%, 15.3%)
CIE-LABlab(49.32, 66.75, -57.24)
CIE-LCHlch(49.32, 87.93, 319.39°)
OKLaboklab(59.25% 0.1646 -0.1611)
OKLCHoklch(59.25% 0.23 315.6)
XYZxyz(32.1306, 17.8560, 66.7065)
Luminance0.1785 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#B040D8 #68D840
analogous
#6440D8 #B040D8 #D840B4
triadic
#B040D8 #D8B040 #40D8B0
tetradic
#B040D8 #D86440 #68D840 #40B4D8
square
#B040D8 #D86440 #68D840 #40B4D8
split-complementary
#B040D8 #B4D840 #40D864
monochromatic
#671B83 #9025B6 #B040D8 #C573E2 #DAA6ED

Accessibility & contrast

On white

4.59
#B040D8 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.57
#B040D8 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#FFFFFF on #B040D8
4.59:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##B040D8#FFFFFF#000000##FFFFFF
##B040D81.004.594.574.59
#FFFFFF4.591.0021.001.00
#0000004.5721.001.0021.00
##FFFFFF4.591.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006FDC
Deuteranopia (green-blind)
#3D78D5
Tritanopia (blue-blind)
#AD5F88
Achromatopsia (no color)
#757575

Design tokens & code

CSS
--color: #b040d8;
/* rgb */ color: rgb(176, 64, 216);
/* oklch */ color: oklch(59.3% 0.230 315.6);
Tailwind
colors: {
  custom: {
    50: '#cc7ee5',
    500: '#b040d8',
    950: '#000000',
  },
}
SCSS
$custom: #b040d8;
$custom-light: #cc7ee5;
$custom-dark: #000000;
JSON
{
  "hex": "#b040d8",
  "rgb": {
    "r": 176,
    "g": 64,
    "b": 216
  },
  "hsl": {
    "h": 284.211,
    "s": 66.087,
    "l": 54.902
  },
  "oklch": {
    "l": 0.59252,
    "c": 0.23035,
    "h": 315.6
  },
  "luminance": 0.17855
}

Semantic roles & 50–950 ramp

primary
#B040D8
secondary
#ABDA9A
accent
#E93F6C
background
#FDF8FE
surface
#FAEFFC
border
#D3CAD5
text
#140B16
muted
#837C84

Preview Lab

Preview with #B040D8

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

Preview Lab → · Contrast checker → · Palette generator →

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