#402B66#402B66

#402B66 is a dark, moderate violet. Relative luminance 0.038; OKLCH L 34.6% C 0.100 H 297.3°. Best body text is #FFFFFF at 11.96:1 contrast (WCAG AA passes).

Color values

HEX#402B66
RGBrgb(64, 43, 102)
HSLhsl(261, 41%, 28%)
HSVhsv(261, 58%, 40%)
CMYKcmyk(37.3%, 57.8%, 0%, 60%)
CIE-LABlab(22.92, 24.17, -31.41)
CIE-LCHlch(22.92, 39.64, 307.58°)
OKLaboklab(34.56% 0.0459 -0.0889)
OKLCHoklch(34.56% 0.1 297.3)
XYZxyz(5.3759, 3.7770, 13.0136)
Luminance0.0378 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402B66 #51662B
analogous
#2B3366 #402B66 #5D2B66
triadic
#402B66 #66402B #2B6640
tetradic
#402B66 #662B33 #51662B #2B665D
square
#402B66 #662B33 #51662B #2B665D
split-complementary
#402B66 #665D2B #33662B
monochromatic
#0E0916 #25193B #402B66 #5B3D91 #7754B7

Accessibility & contrast

On white

11.96
#402B66 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.76
#402B66 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402B66
11.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402B66#FFFFFF#000000##FFFFFF
##402B661.0011.961.7611.96
#FFFFFF11.961.0021.001.00
#0000001.7621.001.0021.00
##FFFFFF11.961.0021.001.00

Color blindness preview

Protanopia (red-blind)
#123768
Deuteranopia (green-blind)
#183665
Tritanopia (blue-blind)
#373744
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #402b66;
/* rgb */ color: rgb(64, 43, 102);
/* oklch */ color: oklch(34.6% 0.100 297.3);
Tailwind
colors: {
  custom: {
    50: '#776592',
    500: '#402b66',
    950: '#000000',
  },
}
SCSS
$custom: #402b66;
$custom-light: #776592;
$custom-dark: #000000;
JSON
{
  "hex": "#402b66",
  "rgb": {
    "r": 64,
    "g": 43,
    "b": 102
  },
  "hsl": {
    "h": 261.356,
    "s": 40.69,
    "l": 28.431
  },
  "oklch": {
    "l": 0.3456,
    "c": 0.10009,
    "h": 297.3
  },
  "luminance": 0.03777
}

Semantic roles & 50–950 ramp

primary
#402B66
secondary
#809855
accent
#D157A5
background
#F7F6F9
surface
#EDEBF1
border
#C8C6CB
text
#09050D
muted
#7B7A7E

Preview Lab

Preview with #402B66

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

Preview Lab → · Contrast checker → · Palette generator →

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