#B040D5#B040D5

#B040D5 is a mid, highly saturated purple. Relative luminance 0.177; OKLCH L 59.1% C 0.228 H 316.4°. Best body text is #FFFFFF at 4.63:1 contrast (WCAG AA passes).

Color values

HEX#B040D5
RGBrgb(176, 64, 213)
HSLhsl(285, 64%, 54%)
HSVhsv(285, 70%, 84%)
CMYKcmyk(17.4%, 70%, 0%, 16.5%)
CIE-LABlab(49.13, 66.17, -55.83)
CIE-LCHlch(49.13, 86.57, 319.84°)
OKLaboklab(59.06% 0.1649 -0.157)
OKLCHoklch(59.06% 0.228 316.4)
XYZxyz(31.7463, 17.7023, 64.6825)
Luminance0.1770 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#B040D5 #65D540
analogous
#6640D5 #B040D5 #D540AF
triadic
#B040D5 #D5B040 #40D5B0
tetradic
#B040D5 #D56640 #65D540 #40AFD5
square
#B040D5 #D56640 #65D540 #40AFD5
split-complementary
#B040D5 #AFD540 #40D566
monochromatic
#661C7F #8F27B1 #B040D5 #C572E0 #DAA4EB

Accessibility & contrast

On white

4.63
#B040D5 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.54
#B040D5 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#FFFFFF on #B040D5
4.63:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##B040D5#FFFFFF#000000##FFFFFF
##B040D51.004.634.544.63
#FFFFFF4.631.0021.001.00
#0000004.5421.001.0021.00
##FFFFFF4.631.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006ED9
Deuteranopia (green-blind)
#4078D2
Tritanopia (blue-blind)
#AE5E86
Achromatopsia (no color)
#757575

Design tokens & code

CSS
--color: #b040d5;
/* rgb */ color: rgb(176, 64, 213);
/* oklch */ color: oklch(59.1% 0.228 316.4);
Tailwind
colors: {
  custom: {
    50: '#cc7ee3',
    500: '#b040d5',
    950: '#000000',
  },
}
SCSS
$custom: #b040d5;
$custom-light: #cc7ee3;
$custom-dark: #000000;
JSON
{
  "hex": "#b040d5",
  "rgb": {
    "r": 176,
    "g": 64,
    "b": 213
  },
  "hsl": {
    "h": 285.101,
    "s": 63.948,
    "l": 54.314
  },
  "oklch": {
    "l": 0.59058,
    "c": 0.22766,
    "h": 316.4
  },
  "luminance": 0.17701
}

Semantic roles & 50–950 ramp

primary
#B040D5
secondary
#A8D899
accent
#E7416A
background
#FDF8FE
surface
#FAEFFC
border
#D3CAD5
text
#140B15
muted
#837C84

Preview Lab

Preview with #B040D5

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

Preview Lab → · Contrast checker → · Palette generator →

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