#402295#402295

#402295 is a dark, vivid violet. Relative luminance 0.044; OKLCH L 37.3% C 0.174 H 286.4°. Best body text is #FFFFFF at 11.17:1 contrast (WCAG AA passes).

Color values

HEX#402295
RGBrgb(64, 34, 149)
HSLhsl(256, 63%, 36%)
HSVhsv(256, 77%, 58%)
CMYKcmyk(57%, 77.2%, 0%, 41.6%)
CIE-LABlab(24.96, 43.55, -57.83)
CIE-LCHlch(24.96, 72.40, 306.98°)
OKLaboklab(37.26% 0.0491 -0.1665)
OKLCHoklch(37.26% 0.174 286.4)
XYZxyz(8.1096, 4.4035, 28.8506)
Luminance0.0440 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402295 #779522
analogous
#223D95 #402295 #792295
triadic
#402295 #954022 #229540
tetradic
#402295 #95223D #779522 #229579
square
#402295 #95223D #779522 #229579
split-complementary
#402295 #957922 #3D9522
monochromatic
#150B31 #2B1763 #402295 #552DC7 #7A58D9

Accessibility & contrast

On white

11.17
#402295 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.88
#402295 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402295
11.17:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402295#FFFFFF#000000##FFFFFF
##4022951.0011.171.8811.17
#FFFFFF11.171.0021.001.00
#0000001.8821.001.0021.00
##FFFFFF11.171.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E98
Deuteranopia (green-blind)
#003893
Tritanopia (blue-blind)
#18425A
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #402295;
/* rgb */ color: rgb(64, 34, 149);
/* oklch */ color: oklch(37.3% 0.174 286.4);
Tailwind
colors: {
  custom: {
    50: '#7f61b5',
    500: '#402295',
    950: '#000000',
  },
}
SCSS
$custom: #402295;
$custom-light: #7f61b5;
$custom-dark: #000000;
JSON
{
  "hex": "#402295",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 149
  },
  "hsl": {
    "h": 255.652,
    "s": 62.842,
    "l": 35.882
  },
  "oklch": {
    "l": 0.3726,
    "c": 0.17358,
    "h": 286.4
  },
  "luminance": 0.04404
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #402295

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

Preview Lab → · Contrast checker → · Palette generator →

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