#402092#402092

#402092 is a dark, vivid violet. Relative luminance 0.042; OKLCH L 36.7% C 0.172 H 287.4°. Best body text is #FFFFFF at 11.42:1 contrast (WCAG AA passes).

Color values

HEX#402092
RGBrgb(64, 32, 146)
HSLhsl(257, 64%, 35%)
HSVhsv(257, 78%, 57%)
CMYKcmyk(56.2%, 78.1%, 0%, 42.7%)
CIE-LABlab(24.32, 43.67, -57.05)
CIE-LCHlch(24.32, 71.84, 307.44°)
OKLaboklab(36.72% 0.0515 -0.1642)
OKLCHoklch(36.72% 0.172 287.4)
XYZxyz(7.8176, 4.1979, 27.5869)
Luminance0.0420 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402092 #729220
analogous
#203992 #402092 #792092
triadic
#402092 #924020 #209240
tetradic
#402092 #922039 #729220 #209279
square
#402092 #922039 #729220 #209279
split-complementary
#402092 #927920 #399220
monochromatic
#140A2E #2A1560 #402092 #562BC4 #7953D9

Accessibility & contrast

On white

11.42
#402092 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.84
#402092 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402092
11.42:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402092#FFFFFF#000000##FFFFFF
##4020921.0011.421.8411.42
#FFFFFF11.421.0021.001.00
#0000001.8421.001.0021.00
##FFFFFF11.421.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C95
Deuteranopia (green-blind)
#003790
Tritanopia (blue-blind)
#1C4058
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #402092;
/* rgb */ color: rgb(64, 32, 146);
/* oklch */ color: oklch(36.7% 0.172 287.4);
Tailwind
colors: {
  custom: {
    50: '#7f60b3',
    500: '#402092',
    950: '#000000',
  },
}
SCSS
$custom: #402092;
$custom-light: #7f60b3;
$custom-dark: #000000;
JSON
{
  "hex": "#402092",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 146
  },
  "hsl": {
    "h": 256.842,
    "s": 64.045,
    "l": 34.902
  },
  "oklch": {
    "l": 0.36716,
    "c": 0.17205,
    "h": 287.4
  },
  "luminance": 0.04198
}

Semantic roles & 50–950 ramp

primary
#402092
secondary
#9FBD51
accent
#E741B8
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #402092

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

Preview Lab → · Contrast checker → · Palette generator →

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