#403170#403170

#403170 is a dark, moderate violet. Relative luminance 0.045; OKLCH L 36.4% C 0.105 H 291.3°. Best body text is #FFFFFF at 11.10:1 contrast (WCAG AA passes).

Color values

HEX#403170
RGBrgb(64, 49, 112)
HSLhsl(254, 39%, 32%)
HSVhsv(254, 56%, 44%)
CMYKcmyk(42.9%, 56.3%, 0%, 56.1%)
CIE-LABlab(25.13, 23.32, -34.33)
CIE-LCHlch(25.13, 41.50, 304.18°)
OKLaboklab(36.41% 0.038 -0.0975)
OKLCHoklch(36.41% 0.105 291.3)
XYZxyz(6.1365, 4.4563, 15.8629)
Luminance0.0446 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#403170 #617031
analogous
#314270 #403170 #603170
triadic
#403170 #704031 #317040
tetradic
#403170 #703142 #617031 #317060
square
#403170 #703142 #617031 #317060
split-complementary
#403170 #706031 #427031
monochromatic
#0F0C1B #281E45 #403170 #58449B #7661BA

Accessibility & contrast

On white

11.10
#403170 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #403170
11.10:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##403170#FFFFFF#000000##FFFFFF
##4031701.0011.101.8911.10
#FFFFFF11.101.0021.001.00
#0000001.8921.001.0021.00
##FFFFFF11.101.0021.001.00

Color blindness preview

Protanopia (red-blind)
#143D72
Deuteranopia (green-blind)
#173A6F
Tritanopia (blue-blind)
#333E4B
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #403170;
/* rgb */ color: rgb(64, 49, 112);
/* oklch */ color: oklch(36.4% 0.105 291.3);
Tailwind
colors: {
  custom: {
    50: '#786999',
    500: '#403170',
    950: '#000000',
  },
}
SCSS
$custom: #403170;
$custom-light: #786999;
$custom-dark: #000000;
JSON
{
  "hex": "#403170",
  "rgb": {
    "r": 64,
    "g": 49,
    "b": 112
  },
  "hsl": {
    "h": 254.286,
    "s": 39.13,
    "l": 31.569
  },
  "oklch": {
    "l": 0.36414,
    "c": 0.10463,
    "h": 291.3
  },
  "luminance": 0.04456
}

Semantic roles & 50–950 ramp

primary
#403170
secondary
#91A15C
accent
#CF59B3
background
#F7F6F9
surface
#EDEBF2
border
#C8C6CC
text
#09060E
muted
#7B7A7E

Preview Lab

Preview with #403170

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

Preview Lab → · Contrast checker → · Palette generator →

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