#402A70#402A70

#402A70 is a dark, moderate violet. Relative luminance 0.039; OKLCH L 35.1% C 0.116 H 294.1°. Best body text is #FFFFFF at 11.78:1 contrast (WCAG AA passes).

Color values

HEX#402A70
RGBrgb(64, 42, 112)
HSLhsl(259, 45%, 30%)
HSVhsv(259, 63%, 44%)
CMYKcmyk(42.9%, 62.5%, 0%, 56.1%)
CIE-LABlab(23.39, 27.81, -37.12)
CIE-LCHlch(23.39, 46.38, 306.84°)
OKLaboklab(35.14% 0.0473 -0.1057)
OKLCHoklch(35.14% 0.116 294.1)
XYZxyz(5.8662, 3.9156, 15.7728)
Luminance0.0392 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402A70 #5A702A
analogous
#2A3770 #402A70 #632A70
triadic
#402A70 #70402A #2A7040
tetradic
#402A70 #702A37 #5A702A #2A7063
square
#402A70 #702A37 #5A702A #2A7063
split-complementary
#402A70 #70632A #37702A
monochromatic
#0D0917 #271943 #402A70 #593B9D #7655BF

Accessibility & contrast

On white

11.78
#402A70 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.78
#402A70 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402A70
11.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402A70#FFFFFF#000000##FFFFFF
##402A701.0011.781.7811.78
#FFFFFF11.781.0021.001.00
#0000001.7821.001.0021.00
##FFFFFF11.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003872
Deuteranopia (green-blind)
#06376E
Tritanopia (blue-blind)
#333948
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #402a70;
/* rgb */ color: rgb(64, 42, 112);
/* oklch */ color: oklch(35.1% 0.116 294.1);
Tailwind
colors: {
  custom: {
    50: '#79649a',
    500: '#402a70',
    950: '#000000',
  },
}
SCSS
$custom: #402a70;
$custom-light: #79649a;
$custom-dark: #000000;
JSON
{
  "hex": "#402a70",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 112
  },
  "hsl": {
    "h": 258.857,
    "s": 45.455,
    "l": 30.196
  },
  "oklch": {
    "l": 0.35135,
    "c": 0.11582,
    "h": 294.1
  },
  "luminance": 0.03916
}

Semantic roles & 50–950 ramp

primary
#402A70
secondary
#89A254
accent
#D553AC
background
#F7F6F9
surface
#EEEBF2
border
#C9C6CC
text
#09050E
muted
#7B7A7E

Preview Lab

Preview with #402A70

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

Preview Lab → · Contrast checker → · Palette generator →

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