#402793#402793

#402793 is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.7% C 0.166 H 286.0°. Best body text is #FFFFFF at 10.88:1 contrast (WCAG AA passes).

Color values

HEX#402793
RGBrgb(64, 39, 147)
HSLhsl(254, 58%, 36%)
HSVhsv(254, 73%, 58%)
CMYKcmyk(56.5%, 73.5%, 0%, 42.4%)
CIE-LABlab(25.70, 40.31, -55.38)
CIE-LCHlch(25.70, 68.50, 306.05°)
OKLaboklab(37.72% 0.0456 -0.1593)
OKLCHoklch(37.72% 0.166 286)
XYZxyz(8.1047, 4.6472, 28.0680)
Luminance0.0465 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402793 #7A9327
analogous
#274493 #402793 #762793
triadic
#402793 #934027 #279340
tetradic
#402793 #932744 #7A9327 #279376
square
#402793 #932744 #7A9327 #279376
split-complementary
#402793 #937627 #449327
monochromatic
#160D32 #2B1A63 #402793 #5534C3 #7B60D5

Accessibility & contrast

On white

10.88
#402793 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.93
#402793 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402793
10.88:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402793#FFFFFF#000000##FFFFFF
##4027931.0010.881.9310.88
#FFFFFF10.881.0021.001.00
#0000001.9321.001.0021.00
##FFFFFF10.881.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004096
Deuteranopia (green-blind)
#003A91
Tritanopia (blue-blind)
#1B445A
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #402793;
/* rgb */ color: rgb(64, 39, 147);
/* oklch */ color: oklch(37.7% 0.166 286.0);
Tailwind
colors: {
  custom: {
    50: '#7e64b4',
    500: '#402793',
    950: '#000000',
  },
}
SCSS
$custom: #402793;
$custom-light: #7e64b4;
$custom-dark: #000000;
JSON
{
  "hex": "#402793",
  "rgb": {
    "r": 64,
    "g": 39,
    "b": 147
  },
  "hsl": {
    "h": 253.889,
    "s": 58.065,
    "l": 36.471
  },
  "oklch": {
    "l": 0.37725,
    "c": 0.16574,
    "h": 286
  },
  "luminance": 0.04648
}

Semantic roles & 50–950 ramp

primary
#402793
secondary
#A4BA5C
accent
#E147BD
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0511
muted
#7C7A80

Preview Lab

Preview with #402793

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

Preview Lab → · Contrast checker → · Palette generator →

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