#402699#402699

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

Color values

HEX#402699
RGBrgb(64, 38, 153)
HSLhsl(254, 60%, 37%)
HSVhsv(254, 75%, 60%)
CMYKcmyk(58.2%, 75.2%, 0%, 40%)
CIE-LABlab(26.09, 42.68, -58.44)
CIE-LCHlch(26.09, 72.37, 306.14°)
OKLaboklab(38.17% 0.045 -0.1683)
OKLCHoklch(38.17% 0.174 285)
XYZxyz(8.5555, 4.7756, 30.6018)
Luminance0.0478 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402699 #7F9926
analogous
#264699 #402699 #792699
triadic
#402699 #994026 #269940
tetradic
#402699 #992646 #7F9926 #269979
square
#402699 #992646 #7F9926 #269979
split-complementary
#402699 #997926 #469926
monochromatic
#170E37 #2B1A68 #402699 #5532CA #7C62D8

Accessibility & contrast

On white

10.74
#402699 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.96
#402699 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402699
10.74:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402699#FFFFFF#000000##FFFFFF
##4026991.0010.741.9610.74
#FFFFFF10.741.0021.001.00
#0000001.9621.001.0021.00
##FFFFFF10.741.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00419C
Deuteranopia (green-blind)
#003A97
Tritanopia (blue-blind)
#12465D
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #402699;
/* rgb */ color: rgb(64, 38, 153);
/* oklch */ color: oklch(38.2% 0.174 285.0);
Tailwind
colors: {
  custom: {
    50: '#7f63b8',
    500: '#402699',
    950: '#000000',
  },
}
SCSS
$custom: #402699;
$custom-light: #7f63b8;
$custom-dark: #000000;
JSON
{
  "hex": "#402699",
  "rgb": {
    "r": 64,
    "g": 38,
    "b": 153
  },
  "hsl": {
    "h": 253.565,
    "s": 60.209,
    "l": 37.451
  },
  "oklch": {
    "l": 0.38169,
    "c": 0.17422,
    "h": 285
  },
  "luminance": 0.04776
}

Semantic roles & 50–950 ramp

primary
#402699
secondary
#A8BD5E
accent
#E344BF
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0511
muted
#7C7A80

Preview Lab

Preview with #402699

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

Preview Lab → · Contrast checker → · Palette generator →

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