#402277#402277

#402277 is a dark, vivid violet. Relative luminance 0.036; OKLCH L 34.4% C 0.137 H 294.2°. Best body text is #FFFFFF at 12.26:1 contrast (WCAG AA passes).

Color values

HEX#402277
RGBrgb(64, 34, 119)
HSLhsl(261, 56%, 30%)
HSVhsv(261, 71%, 47%)
CMYKcmyk(46.2%, 71.4%, 0%, 53.3%)
CIE-LABlab(22.18, 34.68, -43.57)
CIE-LCHlch(22.18, 55.69, 308.52°)
OKLaboklab(34.44% 0.0561 -0.1247)
OKLCHoklch(34.44% 0.137 294.2)
XYZxyz(6.0153, 3.5658, 17.8205)
Luminance0.0357 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402277 #597722
analogous
#222F77 #402277 #6A2277
triadic
#402277 #774022 #227740
tetradic
#402277 #77222F #597722 #22776A
square
#402277 #77222F #597722 #22776A
split-complementary
#402277 #776A22 #2F7722
monochromatic
#0D0718 #261447 #402277 #5A30A7 #7749CB

Accessibility & contrast

On white

12.26
#402277 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.71
#402277 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402277
12.26:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402277#FFFFFF#000000##FFFFFF
##4022771.0012.261.7112.26
#FFFFFF12.261.0021.001.00
#0000001.7121.001.0021.00
##FFFFFF12.261.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00367A
Deuteranopia (green-blind)
#003475
Tritanopia (blue-blind)
#313749
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #402277;
/* rgb */ color: rgb(64, 34, 119);
/* oklch */ color: oklch(34.4% 0.137 294.2);
Tailwind
colors: {
  custom: {
    50: '#7a5f9f',
    500: '#402277',
    950: '#000000',
  },
}
SCSS
$custom: #402277;
$custom-light: #7a5f9f;
$custom-dark: #000000;
JSON
{
  "hex": "#402277",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 119
  },
  "hsl": {
    "h": 261.176,
    "s": 55.556,
    "l": 30
  },
  "oklch": {
    "l": 0.34436,
    "c": 0.13672,
    "h": 294.2
  },
  "luminance": 0.03566
}

Semantic roles & 50–950 ramp

primary
#402277
secondary
#88AA4B
accent
#DF49AA
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A050E
muted
#7C797E

Preview Lab

Preview with #402277

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

Preview Lab → · Contrast checker → · Palette generator →

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