#402995#402995

#402995 is a dark, vivid violet. Relative luminance 0.048; OKLCH L 38.2% C 0.166 H 285.2°. Best body text is #FFFFFF at 10.66:1 contrast (WCAG AA passes).

Color values

HEX#402995
RGBrgb(64, 41, 149)
HSLhsl(253, 57%, 37%)
HSVhsv(253, 72%, 58%)
CMYKcmyk(57%, 72.5%, 0%, 41.6%)
CIE-LABlab(26.29, 39.82, -55.65)
CIE-LCHlch(26.29, 68.43, 305.58°)
OKLaboklab(38.2% 0.0435 -0.1601)
OKLCHoklch(38.2% 0.166 285.2)
XYZxyz(8.3305, 4.8453, 28.9242)
Luminance0.0485 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402995 #7E9529
analogous
#294895 #402995 #762995
triadic
#402995 #954029 #299540
tetradic
#402995 #952948 #7E9529 #299576
square
#402995 #952948 #7E9529 #299576
split-complementary
#402995 #957629 #489529
monochromatic
#170F35 #2B1C65 #402995 #5536C5 #7C64D4

Accessibility & contrast

On white

10.66
#402995 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.97
#402995 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402995
10.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402995#FFFFFF#000000##FFFFFF
##4029951.0010.661.9710.66
#FFFFFF10.661.0021.001.00
#0000001.9721.001.0021.00
##FFFFFF10.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004198
Deuteranopia (green-blind)
#003B93
Tritanopia (blue-blind)
#18465C
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #402995;
/* rgb */ color: rgb(64, 41, 149);
/* oklch */ color: oklch(38.2% 0.166 285.2);
Tailwind
colors: {
  custom: {
    50: '#7e65b5',
    500: '#402995',
    950: '#000000',
  },
}
SCSS
$custom: #402995;
$custom-light: #7e65b5;
$custom-dark: #000000;
JSON
{
  "hex": "#402995",
  "rgb": {
    "r": 64,
    "g": 41,
    "b": 149
  },
  "hsl": {
    "h": 252.778,
    "s": 56.842,
    "l": 37.255
  },
  "oklch": {
    "l": 0.38198,
    "c": 0.16595,
    "h": 285.2
  },
  "luminance": 0.04846
}

Semantic roles & 50–950 ramp

primary
#402995
secondary
#A7BA60
accent
#E048C0
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0611
muted
#7C7A80

Preview Lab

Preview with #402995

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

Preview Lab → · Contrast checker → · Palette generator →

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