#B040C8#B040C8

#B040C8 is a mid, highly saturated purple. Relative luminance 0.171; OKLCH L 58.2% C 0.216 H 320.0°. Best body text is #FFFFFF at 4.76:1 contrast (WCAG AA passes).

Color values

HEX#B040C8
RGBrgb(176, 64, 200)
HSLhsl(289, 55%, 52%)
HSVhsv(289, 68%, 78%)
CMYKcmyk(12%, 68%, 0%, 21.6%)
CIE-LABlab(48.35, 63.69, -49.62)
CIE-LCHlch(48.35, 80.74, 322.08°)
OKLaboklab(58.24% 0.1657 -0.1388)
OKLCHoklch(58.24% 0.216 320)
XYZxyz(30.1619, 17.0685, 56.3382)
Luminance0.1707 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#B040C8 #58C840
analogous
#6C40C8 #B040C8 #C8409C
triadic
#B040C8 #C8B040 #40C8B0
tetradic
#B040C8 #C86C40 #58C840 #409CC8
square
#B040C8 #C86C40 #58C840 #409CC8
split-complementary
#B040C8 #9CC840 #40C86C
monochromatic
#60206E #8A2D9D #B040C8 #C470D6 #D79FE3

Accessibility & contrast

On white

4.76
#B040C8 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.41
#B040C8 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #B040C8
4.76:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##B040C8#FFFFFF#000000##FFFFFF
##B040C81.004.764.414.76
#FFFFFF4.761.0021.001.00
#0000004.4121.001.0021.00
##FFFFFF4.761.0021.001.00

Color blindness preview

Protanopia (red-blind)
#066BCC
Deuteranopia (green-blind)
#4C77C5
Tritanopia (blue-blind)
#B1597F
Achromatopsia (no color)
#737373

Design tokens & code

CSS
--color: #b040c8;
/* rgb */ color: rgb(176, 64, 200);
/* oklch */ color: oklch(58.2% 0.216 320.0);
Tailwind
colors: {
  custom: {
    50: '#cb7ed9',
    500: '#b040c8',
    950: '#000000',
  },
}
SCSS
$custom: #b040c8;
$custom-light: #cb7ed9;
$custom-dark: #000000;
JSON
{
  "hex": "#b040c8",
  "rgb": {
    "r": 176,
    "g": 64,
    "b": 200
  },
  "hsl": {
    "h": 289.412,
    "s": 55.285,
    "l": 51.765
  },
  "oklch": {
    "l": 0.58243,
    "c": 0.21613,
    "h": 320
  },
  "luminance": 0.17067
}

Semantic roles & 50–950 ramp

primary
#B040C8
secondary
#9FD094
accent
#DF4964
background
#FCF8FD
surface
#F9EFFB
border
#D2CAD4
text
#140B15
muted
#827C83

Preview Lab

Preview with #B040C8

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

Preview Lab → · Contrast checker → · Palette generator →

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