#402297#402297

#402297 is a dark, vivid violet. Relative luminance 0.045; OKLCH L 37.5% C 0.176 H 286.0°. Best body text is #FFFFFF at 11.09:1 contrast (WCAG AA passes).

Color values

HEX#402297
RGBrgb(64, 34, 151)
HSLhsl(255, 63%, 36%)
HSVhsv(255, 77%, 59%)
CMYKcmyk(57.6%, 77.5%, 0%, 40.8%)
CIE-LABlab(25.16, 44.15, -58.74)
CIE-LCHlch(25.16, 73.48, 306.93°)
OKLaboklab(37.46% 0.0486 -0.1691)
OKLCHoklch(37.46% 0.176 286)
XYZxyz(8.2706, 4.4679, 29.6987)
Luminance0.0447 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402297 #799722
analogous
#223F97 #402297 #7B2297
triadic
#402297 #974022 #229740
tetradic
#402297 #97223F #799722 #22977B
square
#402297 #97223F #799722 #22977B
split-complementary
#402297 #977B22 #3F9722
monochromatic
#160C33 #2B1765 #402297 #552DC9 #7A5ADA

Accessibility & contrast

On white

11.09
#402297 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.89
#402297 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402297
11.09:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402297#FFFFFF#000000##FFFFFF
##4022971.0011.091.8911.09
#FFFFFF11.091.0021.001.00
#0000001.8921.001.0021.00
##FFFFFF11.091.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F9A
Deuteranopia (green-blind)
#003895
Tritanopia (blue-blind)
#16435B
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #402297;
/* rgb */ color: rgb(64, 34, 151);
/* oklch */ color: oklch(37.5% 0.176 286.0);
Tailwind
colors: {
  custom: {
    50: '#7f61b7',
    500: '#402297',
    950: '#000000',
  },
}
SCSS
$custom: #402297;
$custom-light: #7f61b7;
$custom-dark: #000000;
JSON
{
  "hex": "#402297",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 151
  },
  "hsl": {
    "h": 255.385,
    "s": 63.243,
    "l": 36.275
  },
  "oklch": {
    "l": 0.3746,
    "c": 0.17596,
    "h": 286
  },
  "luminance": 0.04468
}

Semantic roles & 50–950 ramp

primary
#402297
secondary
#A4BE57
accent
#E642BC
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #402297

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

Preview Lab → · Contrast checker → · Palette generator →

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