#402C9F#402C9F

#402C9F is a dark, vivid violet. Relative luminance 0.054; OKLCH L 39.6% C 0.175 H 282.9°. Best body text is #FFFFFF at 10.10:1 contrast (WCAG AA passes).

Color values

HEX#402C9F
RGBrgb(64, 44, 159)
HSLhsl(250, 57%, 40%)
HSVhsv(250, 72%, 62%)
CMYKcmyk(59.7%, 72.3%, 0%, 37.6%)
CIE-LABlab(27.83, 41.25, -59.24)
CIE-LCHlch(27.83, 72.19, 304.85°)
OKLaboklab(39.58% 0.039 -0.1707)
OKLCHoklch(39.58% 0.175 282.9)
XYZxyz(9.2711, 5.3939, 33.3468)
Luminance0.0539 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402C9F #8B9F2C
analogous
#2C519F #402C9F #7A2C9F
triadic
#402C9F #9F402C #2C9F40
tetradic
#402C9F #9F2C51 #8B9F2C #2C9F7A
square
#402C9F #9F2C51 #8B9F2C #2C9F7A
split-complementary
#402C9F #9F7A2C #519F2C
monochromatic
#19113F #2D1F6F #402C9F #573ECA #816ED7

Accessibility & contrast

On white

10.10
#402C9F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.08
#402C9F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402C9F
10.10:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402C9F#FFFFFF#000000##FFFFFF
##402C9F1.0010.102.0810.10
#FFFFFF10.101.0021.001.00
#0000002.0821.001.0021.00
##FFFFFF10.101.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0045A2
Deuteranopia (green-blind)
#003E9D
Tritanopia (blue-blind)
#014B62
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #402c9f;
/* rgb */ color: rgb(64, 44, 159);
/* oklch */ color: oklch(39.6% 0.175 282.9);
Tailwind
colors: {
  custom: {
    50: '#8067bc',
    500: '#402c9f',
    950: '#000000',
  },
}
SCSS
$custom: #402c9f;
$custom-light: #8067bc;
$custom-dark: #000000;
JSON
{
  "hex": "#402c9f",
  "rgb": {
    "r": 64,
    "g": 44,
    "b": 159
  },
  "hsl": {
    "h": 250.435,
    "s": 56.65,
    "l": 39.804
  },
  "oklch": {
    "l": 0.39579,
    "c": 0.17507,
    "h": 282.9
  },
  "luminance": 0.05395
}

Semantic roles & 50–950 ramp

primary
#402C9F
secondary
#AFBE69
accent
#E048C5
background
#F8F6FB
surface
#EFEBF7
border
#CAC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402C9F

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

Preview Lab → · Contrast checker → · Palette generator →

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