#402075#402075

#402075 is a dark, vivid violet. Relative luminance 0.034; OKLCH L 34.0% C 0.137 H 295.4°. Best body text is #FFFFFF at 12.49:1 contrast (WCAG AA passes).

Color values

HEX#402075
RGBrgb(64, 32, 117)
HSLhsl(263, 57%, 29%)
HSVhsv(263, 73%, 46%)
CMYKcmyk(45.3%, 72.6%, 0%, 54.1%)
CIE-LABlab(21.61, 35.22, -43.23)
CIE-LCHlch(21.61, 55.76, 309.17°)
OKLaboklab(33.97% 0.0587 -0.1236)
OKLCHoklch(33.97% 0.137 295.4)
XYZxyz(5.8409, 3.4072, 17.1761)
Luminance0.0341 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402075 #557520
analogous
#202B75 #402075 #6B2075
triadic
#402075 #754020 #207540
tetradic
#402075 #75202B #557520 #20756B
square
#402075 #75202B #557520 #20756B
split-complementary
#402075 #756B20 #2B7520
monochromatic
#0D0718 #261345 #402075 #5A2DA5 #7744CC

Accessibility & contrast

On white

12.49
#402075 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.68
#402075 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402075
12.49:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402075#FFFFFF#000000##FFFFFF
##4020751.0012.491.6812.49
#FFFFFF12.491.0021.001.00
#0000001.6821.001.0021.00
##FFFFFF12.491.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003478
Deuteranopia (green-blind)
#003373
Tritanopia (blue-blind)
#323548
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #402075;
/* rgb */ color: rgb(64, 32, 117);
/* oklch */ color: oklch(34.0% 0.137 295.4);
Tailwind
colors: {
  custom: {
    50: '#7a5e9d',
    500: '#402075',
    950: '#000000',
  },
}
SCSS
$custom: #402075;
$custom-light: #7a5e9d;
$custom-dark: #000000;
JSON
{
  "hex": "#402075",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 117
  },
  "hsl": {
    "h": 262.588,
    "s": 57.047,
    "l": 29.216
  },
  "oklch": {
    "l": 0.33972,
    "c": 0.13685,
    "h": 295.4
  },
  "luminance": 0.03407
}

Semantic roles & 50–950 ramp

primary
#402075
secondary
#84A848
accent
#E047A7
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A040E
muted
#7C797E

Preview Lab

Preview with #402075

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

Preview Lab → · Contrast checker → · Palette generator →

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