#402BA8#402BA8

#402BA8 is a dark, vivid violet. Relative luminance 0.056; OKLCH L 40.3% C 0.187 H 281.6°. Best body text is #FFFFFF at 9.86:1 contrast (WCAG AA passes).

Color values

HEX#402BA8
RGBrgb(64, 43, 168)
HSLhsl(250, 59%, 41%)
HSVhsv(250, 74%, 66%)
CMYKcmyk(61.9%, 74.4%, 0%, 34.1%)
CIE-LABlab(28.50, 44.59, -63.60)
CIE-LCHlch(28.50, 77.67, 305.04°)
OKLaboklab(40.32% 0.0377 -0.1834)
OKLCHoklch(40.32% 0.187 281.6)
XYZxyz(10.0439, 5.6442, 37.5984)
Luminance0.0565 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402BA8 #93A82B
analogous
#2B55A8 #402BA8 #7F2BA8
triadic
#402BA8 #A8402B #2BA840
tetradic
#402BA8 #A82B55 #93A82B #2BA87F
square
#402BA8 #A82B55 #93A82B #2BA87F
split-complementary
#402BA8 #A87F2B #55A82B
monochromatic
#1B1247 #2D1F77 #402BA8 #5942CF #8472DB

Accessibility & contrast

On white

9.86
#402BA8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.13
#402BA8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402BA8
9.86:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402BA8#FFFFFF#000000##FFFFFF
##402BA81.009.862.139.86
#FFFFFF9.861.0021.001.00
#0000002.1321.001.0021.00
##FFFFFF9.861.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0047AC
Deuteranopia (green-blind)
#003FA6
Tritanopia (blue-blind)
#004E67
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #402ba8;
/* rgb */ color: rgb(64, 43, 168);
/* oklch */ color: oklch(40.3% 0.187 281.6);
Tailwind
colors: {
  custom: {
    50: '#8267c3',
    500: '#402ba8',
    950: '#000000',
  },
}
SCSS
$custom: #402ba8;
$custom-light: #8267c3;
$custom-dark: #000000;
JSON
{
  "hex": "#402ba8",
  "rgb": {
    "r": 64,
    "g": 43,
    "b": 168
  },
  "hsl": {
    "h": 250.08,
    "s": 59.242,
    "l": 41.373
  },
  "oklch": {
    "l": 0.40315,
    "c": 0.18724,
    "h": 281.6
  },
  "luminance": 0.05645
}

Semantic roles & 50–950 ramp

primary
#402BA8
secondary
#B4C26C
accent
#E245C8
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0C0613
muted
#7D7A82

Preview Lab

Preview with #402BA8

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

Preview Lab → · Contrast checker → · Palette generator →

#402BA8 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva