#402897#402897

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

Color values

HEX#402897
RGBrgb(64, 40, 151)
HSLhsl(253, 58%, 37%)
HSVhsv(253, 74%, 59%)
CMYKcmyk(57.6%, 73.5%, 0%, 40.8%)
CIE-LABlab(26.28, 40.99, -56.90)
CIE-LCHlch(26.28, 70.13, 305.77°)
OKLaboklab(38.25% 0.0439 -0.1638)
OKLCHoklch(38.25% 0.17 285)
XYZxyz(8.4574, 4.8414, 29.7610)
Luminance0.0484 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402897 #7F9728
analogous
#284897 #402897 #782897
triadic
#402897 #974028 #289740
tetradic
#402897 #972848 #7F9728 #289778
square
#402897 #972848 #7F9728 #289778
split-complementary
#402897 #977828 #489728
monochromatic
#170E36 #2B1B67 #402897 #5535C7 #7C64D6

Accessibility & contrast

On white

10.67
#402897 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402897
10.67:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402897#FFFFFF#000000##FFFFFF
##4028971.0010.671.9710.67
#FFFFFF10.671.0021.001.00
#0000001.9721.001.0021.00
##FFFFFF10.671.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00419A
Deuteranopia (green-blind)
#003B95
Tritanopia (blue-blind)
#15465D
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #402897;
/* rgb */ color: rgb(64, 40, 151);
/* oklch */ color: oklch(38.2% 0.170 285.0);
Tailwind
colors: {
  custom: {
    50: '#7f64b7',
    500: '#402897',
    950: '#000000',
  },
}
SCSS
$custom: #402897;
$custom-light: #7f64b7;
$custom-dark: #000000;
JSON
{
  "hex": "#402897",
  "rgb": {
    "r": 64,
    "g": 40,
    "b": 151
  },
  "hsl": {
    "h": 252.973,
    "s": 58.115,
    "l": 37.451
  },
  "oklch": {
    "l": 0.38247,
    "c": 0.16958,
    "h": 285
  },
  "luminance": 0.04842
}

Semantic roles & 50–950 ramp

primary
#402897
secondary
#A8BC5F
accent
#E146C0
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0611
muted
#7C7A80

Preview Lab

Preview with #402897

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

Preview Lab → · Contrast checker → · Palette generator →

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