#402270#402270

#402270 is a dark, vivid violet. Relative luminance 0.034; OKLCH L 33.8% C 0.128 H 296.6°. Best body text is #FFFFFF at 12.49:1 contrast (WCAG AA passes).

Color values

HEX#402270
RGBrgb(64, 34, 112)
HSLhsl(263, 53%, 29%)
HSVhsv(263, 70%, 44%)
CMYKcmyk(42.9%, 69.6%, 0%, 56.1%)
CIE-LABlab(21.59, 32.64, -40.03)
CIE-LCHlch(21.59, 51.65, 309.19°)
OKLaboklab(33.83% 0.0572 -0.1142)
OKLCHoklch(33.83% 0.128 296.6)
XYZxyz(5.6102, 3.4038, 15.6875)
Luminance0.0340 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402270 #527022
analogous
#222B70 #402270 #672270
triadic
#402270 #704022 #227040
tetradic
#402270 #70222B #527022 #227067
square
#402270 #70222B #527022 #227067
split-complementary
#402270 #706722 #2B7022
monochromatic
#0D0717 #251441 #402270 #5B309F #7746C7

Accessibility & contrast

On white

12.49
#402270 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.68
#402270 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402270
12.49:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402270#FFFFFF#000000##FFFFFF
##4022701.0012.491.6812.49
#FFFFFF12.491.0021.001.00
#0000001.6821.001.0021.00
##FFFFFF12.491.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003472
Deuteranopia (green-blind)
#00336E
Tritanopia (blue-blind)
#343446
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #402270;
/* rgb */ color: rgb(64, 34, 112);
/* oklch */ color: oklch(33.8% 0.128 296.6);
Tailwind
colors: {
  custom: {
    50: '#795f9a',
    500: '#402270',
    950: '#000000',
  },
}
SCSS
$custom: #402270;
$custom-light: #795f9a;
$custom-dark: #000000;
JSON
{
  "hex": "#402270",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 112
  },
  "hsl": {
    "h": 263.077,
    "s": 53.425,
    "l": 28.627
  },
  "oklch": {
    "l": 0.33831,
    "c": 0.12779,
    "h": 296.6
  },
  "luminance": 0.03404
}

Semantic roles & 50–950 ramp

primary
#402270
secondary
#81A34A
accent
#DD4BA5
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#09050E
muted
#7B797E

Preview Lab

Preview with #402270

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

Preview Lab → · Contrast checker → · Palette generator →

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