#402697#402697

#402697 is a dark, vivid violet. Relative luminance 0.047; OKLCH L 38.0% C 0.172 H 285.4°. Best body text is #FFFFFF at 10.81:1 contrast (WCAG AA passes).

Color values

HEX#402697
RGBrgb(64, 38, 151)
HSLhsl(254, 60%, 37%)
HSVhsv(254, 75%, 59%)
CMYKcmyk(57.6%, 74.8%, 0%, 40.8%)
CIE-LABlab(25.89, 42.07, -57.54)
CIE-LCHlch(25.89, 71.28, 306.18°)
OKLaboklab(37.97% 0.0455 -0.1656)
OKLCHoklch(37.97% 0.172 285.4)
XYZxyz(8.3917, 4.7101, 29.7391)
Luminance0.0471 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402697 #7D9726
analogous
#264597 #402697 #782697
triadic
#402697 #974026 #269740
tetradic
#402697 #972645 #7D9726 #269778
square
#402697 #972645 #7D9726 #269778
split-complementary
#402697 #977826 #459726
monochromatic
#170D35 #2B1A66 #402697 #5532C8 #7C60D7

Accessibility & contrast

On white

10.81
#402697 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.94
#402697 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402697
10.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402697#FFFFFF#000000##FFFFFF
##4026971.0010.811.9410.81
#FFFFFF10.811.0021.001.00
#0000001.9421.001.0021.00
##FFFFFF10.811.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00409A
Deuteranopia (green-blind)
#003A95
Tritanopia (blue-blind)
#15455C
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #402697;
/* rgb */ color: rgb(64, 38, 151);
/* oklch */ color: oklch(38.0% 0.172 285.4);
Tailwind
colors: {
  custom: {
    50: '#7f63b7',
    500: '#402697',
    950: '#000000',
  },
}
SCSS
$custom: #402697;
$custom-light: #7f63b7;
$custom-dark: #000000;
JSON
{
  "hex": "#402697",
  "rgb": {
    "r": 64,
    "g": 38,
    "b": 151
  },
  "hsl": {
    "h": 253.805,
    "s": 59.788,
    "l": 37.059
  },
  "oklch": {
    "l": 0.37974,
    "c": 0.17178,
    "h": 285.4
  },
  "luminance": 0.04711
}

Semantic roles & 50–950 ramp

primary
#402697
secondary
#A6BC5C
accent
#E345BF
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0511
muted
#7C7A80

Preview Lab

Preview with #402697

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

Preview Lab → · Contrast checker → · Palette generator →

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