#B040D4#B040D4

#B040D4 is a mid, highly saturated purple. Relative luminance 0.176; OKLCH L 59.0% C 0.227 H 316.7°. Best body text is #FFFFFF at 4.64:1 contrast (WCAG AA passes).

Color values

HEX#B040D4
RGBrgb(176, 64, 212)
HSLhsl(285, 63%, 54%)
HSVhsv(285, 70%, 83%)
CMYKcmyk(17%, 69.8%, 0%, 16.9%)
CIE-LABlab(49.07, 65.97, -55.36)
CIE-LCHlch(49.07, 86.12, 320.00°)
OKLaboklab(58.99% 0.165 -0.1556)
OKLCHoklch(58.99% 0.227 316.7)
XYZxyz(31.6198, 17.6516, 64.0161)
Luminance0.1765 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#B040D4 #64D440
analogous
#6640D4 #B040D4 #D440AE
triadic
#B040D4 #D4B040 #40D4B0
tetradic
#B040D4 #D46640 #64D440 #40AED4
square
#B040D4 #D46640 #64D440 #40AED4
split-complementary
#B040D4 #AED440 #40D466
monochromatic
#661C7D #8E27AF #B040D4 #C572DF #D9A4EA

Accessibility & contrast

On white

4.64
#B040D4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.53
#B040D4 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#FFFFFF on #B040D4
4.64:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##B040D4#FFFFFF#000000##FFFFFF
##B040D41.004.644.534.64
#FFFFFF4.641.0021.001.00
#0000004.5321.001.0021.00
##FFFFFF4.641.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006ED8
Deuteranopia (green-blind)
#4178D1
Tritanopia (blue-blind)
#AE5E86
Achromatopsia (no color)
#757575

Design tokens & code

CSS
--color: #b040d4;
/* rgb */ color: rgb(176, 64, 212);
/* oklch */ color: oklch(59.0% 0.227 316.7);
Tailwind
colors: {
  custom: {
    50: '#cc7ee2',
    500: '#b040d4',
    950: '#000000',
  },
}
SCSS
$custom: #b040d4;
$custom-light: #cc7ee2;
$custom-dark: #000000;
JSON
{
  "hex": "#b040d4",
  "rgb": {
    "r": 176,
    "g": 64,
    "b": 212
  },
  "hsl": {
    "h": 285.405,
    "s": 63.248,
    "l": 54.118
  },
  "oklch": {
    "l": 0.58994,
    "c": 0.22677,
    "h": 316.7
  },
  "luminance": 0.1765
}

Semantic roles & 50–950 ramp

primary
#B040D4
secondary
#A8D798
accent
#E6426A
background
#FDF8FD
surface
#FAEFFB
border
#D3CAD4
text
#140B15
muted
#837C83

Preview Lab

Preview with #B040D4

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

Preview Lab → · Contrast checker → · Palette generator →

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