#402BA4#402BA4

#402BA4 is a dark, vivid violet. Relative luminance 0.055; OKLCH L 39.9% C 0.182 H 282.2°. Best body text is #FFFFFF at 10.00:1 contrast (WCAG AA passes).

Color values

HEX#402BA4
RGBrgb(64, 43, 164)
HSLhsl(250, 58%, 41%)
HSVhsv(250, 74%, 64%)
CMYKcmyk(61%, 73.8%, 0%, 35.7%)
CIE-LABlab(28.11, 43.36, -61.82)
CIE-LCHlch(28.11, 75.51, 305.04°)
OKLaboklab(39.92% 0.0386 -0.1782)
OKLCHoklch(39.92% 0.182 282.2)
XYZxyz(9.6770, 5.4974, 35.6659)
Luminance0.0550 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402BA4 #8FA42B
analogous
#2B53A4 #402BA4 #7C2BA4
triadic
#402BA4 #A4402B #2BA440
tetradic
#402BA4 #A42B53 #8FA42B #2BA47C
square
#402BA4 #A42B53 #8FA42B #2BA47C
split-complementary
#402BA4 #A47C2B #53A42B
monochromatic
#1A1243 #2D1E74 #402BA4 #583FCD #8270D9

Accessibility & contrast

On white

10.00
#402BA4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.10
#402BA4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402BA4
10.00:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402BA4#FFFFFF#000000##FFFFFF
##402BA41.0010.002.1010.00
#FFFFFF10.001.0021.001.00
#0000002.1021.001.0021.00
##FFFFFF10.001.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0046A8
Deuteranopia (green-blind)
#003EA2
Tritanopia (blue-blind)
#004D65
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #402ba4;
/* rgb */ color: rgb(64, 43, 164);
/* oklch */ color: oklch(39.9% 0.182 282.2);
Tailwind
colors: {
  custom: {
    50: '#8167c0',
    500: '#402ba4',
    950: '#000000',
  },
}
SCSS
$custom: #402ba4;
$custom-light: #8167c0;
$custom-dark: #000000;
JSON
{
  "hex": "#402ba4",
  "rgb": {
    "r": 64,
    "g": 43,
    "b": 164
  },
  "hsl": {
    "h": 250.413,
    "s": 58.454,
    "l": 40.588
  },
  "oklch": {
    "l": 0.39922,
    "c": 0.18235,
    "h": 282.2
  },
  "luminance": 0.05498
}

Semantic roles & 50–950 ramp

primary
#402BA4
secondary
#B2C16A
accent
#E246C7
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0C0612
muted
#7D7A81

Preview Lab

Preview with #402BA4

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

Preview Lab → · Contrast checker → · Palette generator →

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