#402294#402294

#402294 is a dark, vivid violet. Relative luminance 0.044; OKLCH L 37.2% C 0.172 H 286.7°. Best body text is #FFFFFF at 11.20:1 contrast (WCAG AA passes).

Color values

HEX#402294
RGBrgb(64, 34, 148)
HSLhsl(256, 63%, 36%)
HSVhsv(256, 77%, 58%)
CMYKcmyk(56.8%, 77%, 0%, 42%)
CIE-LABlab(24.86, 43.26, -57.38)
CIE-LCHlch(24.86, 71.86, 307.01°)
OKLaboklab(37.16% 0.0494 -0.1651)
OKLCHoklch(37.16% 0.172 286.7)
XYZxyz(8.0301, 4.3717, 28.4319)
Luminance0.0437 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402294 #769422
analogous
#223D94 #402294 #792294
triadic
#402294 #944022 #229440
tetradic
#402294 #94223D #769422 #229479
square
#402294 #94223D #769422 #229479
split-complementary
#402294 #947922 #3D9422
monochromatic
#150B30 #2A1762 #402294 #562DC6 #7A58D9

Accessibility & contrast

On white

11.20
#402294 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.87
#402294 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402294
11.20:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402294#FFFFFF#000000##FFFFFF
##4022941.0011.201.8711.20
#FFFFFF11.201.0021.001.00
#0000001.8721.001.0021.00
##FFFFFF11.201.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E97
Deuteranopia (green-blind)
#003892
Tritanopia (blue-blind)
#1A425A
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #402294;
/* rgb */ color: rgb(64, 34, 148);
/* oklch */ color: oklch(37.2% 0.172 286.7);
Tailwind
colors: {
  custom: {
    50: '#7f61b4',
    500: '#402294',
    950: '#000000',
  },
}
SCSS
$custom: #402294;
$custom-light: #7f61b4;
$custom-dark: #000000;
JSON
{
  "hex": "#402294",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 148
  },
  "hsl": {
    "h": 255.789,
    "s": 62.637,
    "l": 35.686
  },
  "oklch": {
    "l": 0.37161,
    "c": 0.17238,
    "h": 286.7
  },
  "luminance": 0.04372
}

Semantic roles & 50–950 ramp

primary
#402294
secondary
#A1BD55
accent
#E642BB
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #402294

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

Preview Lab → · Contrast checker → · Palette generator →

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