#402D62#402D62

#402D62 is a dark, moderate violet. Relative luminance 0.038; OKLCH L 34.7% C 0.091 H 298.1°. Best body text is #FFFFFF at 11.87:1 contrast (WCAG AA passes).

Color values

HEX#402D62
RGBrgb(64, 45, 98)
HSLhsl(262, 37%, 28%)
HSVhsv(262, 54%, 38%)
CMYKcmyk(34.7%, 54.1%, 0%, 61.6%)
CIE-LABlab(23.16, 21.69, -28.41)
CIE-LCHlch(23.16, 35.75, 307.36°)
OKLaboklab(34.66% 0.0427 -0.0801)
OKLCHoklch(34.66% 0.091 298.1)
XYZxyz(5.2568, 3.8485, 12.0188)
Luminance0.0385 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402D62 #4F622D
analogous
#2D3462 #402D62 #5A2D62
triadic
#402D62 #62402D #2D6240
tetradic
#402D62 #622D34 #4F622D #2D625A
square
#402D62 #622D34 #4F622D #2D625A
split-complementary
#402D62 #625A2D #34622D
monochromatic
#0E0A15 #251A38 #402D62 #5B408C #7857B2

Accessibility & contrast

On white

11.87
#402D62 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.77
#402D62 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402D62
11.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402D62#FFFFFF#000000##FFFFFF
##402D621.0011.871.7711.87
#FFFFFF11.871.0021.001.00
#0000001.7721.001.0021.00
##FFFFFF11.871.0021.001.00

Color blindness preview

Protanopia (red-blind)
#1A3764
Deuteranopia (green-blind)
#1F3761
Tritanopia (blue-blind)
#393743
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #402d62;
/* rgb */ color: rgb(64, 45, 98);
/* oklch */ color: oklch(34.7% 0.091 298.1);
Tailwind
colors: {
  custom: {
    50: '#77668f',
    500: '#402d62',
    950: '#000000',
  },
}
SCSS
$custom: #402d62;
$custom-light: #77668f;
$custom-dark: #000000;
JSON
{
  "hex": "#402d62",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 98
  },
  "hsl": {
    "h": 261.509,
    "s": 37.063,
    "l": 28.039
  },
  "oklch": {
    "l": 0.34656,
    "c": 0.09082,
    "h": 298.1
  },
  "luminance": 0.03849
}

Semantic roles & 50–950 ramp

primary
#402D62
secondary
#7E9457
accent
#CD5BA4
background
#F7F6F8
surface
#EDEBF0
border
#C8C6CB
text
#09060C
muted
#7B7A7D

Preview Lab

Preview with #402D62

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

Preview Lab → · Contrast checker → · Palette generator →

#402D62 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva