#402D63#402D63

#402D63 is a dark, moderate violet. Relative luminance 0.039; OKLCH L 34.7% C 0.092 H 297.6°. Best body text is #FFFFFF at 11.84:1 contrast (WCAG AA passes).

Color values

HEX#402D63
RGBrgb(64, 45, 99)
HSLhsl(261, 38%, 28%)
HSVhsv(261, 55%, 39%)
CMYKcmyk(35.4%, 54.5%, 0%, 61.2%)
CIE-LABlab(23.23, 21.98, -28.97)
CIE-LCHlch(23.23, 36.36, 307.20°)
OKLaboklab(34.73% 0.0428 -0.0818)
OKLCHoklch(34.73% 0.092 297.6)
XYZxyz(5.3043, 3.8675, 12.2690)
Luminance0.0387 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402D63 #50632D
analogous
#2D3563 #402D63 #5B2D63
triadic
#402D63 #63402D #2D6340
tetradic
#402D63 #632D35 #50632D #2D635B
square
#402D63 #632D35 #50632D #2D635B
split-complementary
#402D63 #635B2D #35632D
monochromatic
#0E0A15 #251A39 #402D63 #5B408D #7858B3

Accessibility & contrast

On white

11.84
#402D63 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402D63
11.84:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402D63#FFFFFF#000000##FFFFFF
##402D631.0011.841.7711.84
#FFFFFF11.841.0021.001.00
#0000001.7721.001.0021.00
##FFFFFF11.841.0021.001.00

Color blindness preview

Protanopia (red-blind)
#193865
Deuteranopia (green-blind)
#1E3762
Tritanopia (blue-blind)
#383743
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #402d63;
/* rgb */ color: rgb(64, 45, 99);
/* oklch */ color: oklch(34.7% 0.092 297.6);
Tailwind
colors: {
  custom: {
    50: '#776690',
    500: '#402d63',
    950: '#000000',
  },
}
SCSS
$custom: #402d63;
$custom-light: #776690;
$custom-dark: #000000;
JSON
{
  "hex": "#402d63",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 99
  },
  "hsl": {
    "h": 261.111,
    "s": 37.5,
    "l": 28.235
  },
  "oklch": {
    "l": 0.34725,
    "c": 0.09229,
    "h": 297.6
  },
  "luminance": 0.03868
}

Semantic roles & 50–950 ramp

primary
#402D63
secondary
#7F9557
accent
#CD5AA5
background
#F7F6F8
surface
#EDEBF0
border
#C8C6CB
text
#09060C
muted
#7B7A7D

Preview Lab

Preview with #402D63

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

Preview Lab → · Contrast checker → · Palette generator →

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