#40317E#40317E

#40317E is a dark, vivid violet. Relative luminance 0.048; OKLCH L 37.5% C 0.125 H 287.8°. Best body text is #FFFFFF at 10.72:1 contrast (WCAG AA passes).

Color values

HEX#40317E
RGBrgb(64, 49, 126)
HSLhsl(252, 44%, 34%)
HSVhsv(252, 61%, 49%)
CMYKcmyk(49.2%, 61.1%, 0%, 50.6%)
CIE-LABlab(26.14, 27.74, -41.59)
CIE-LCHlch(26.14, 49.99, 303.70°)
OKLaboklab(37.48% 0.0381 -0.1188)
OKLCHoklch(37.48% 0.125 287.8)
XYZxyz(6.9775, 4.7927, 20.2921)
Luminance0.0479 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40317E #6F7E31
analogous
#31497E #40317E #67317E
triadic
#40317E #7E4031 #317E40
tetradic
#40317E #7E3149 #6F7E31 #317E67
square
#40317E #7E3149 #6F7E31 #317E67
split-complementary
#40317E #7E6731 #497E31
monochromatic
#130F26 #2A2052 #40317E #5642AA #7866C3

Accessibility & contrast

On white

10.72
#40317E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.96
#40317E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40317E
10.72:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40317E#FFFFFF#000000##FFFFFF
##40317E1.0010.721.9610.72
#FFFFFF10.721.0021.001.00
#0000001.9621.001.0021.00
##FFFFFF10.721.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004081
Deuteranopia (green-blind)
#003C7C
Tritanopia (blue-blind)
#2C4352
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #40317e;
/* rgb */ color: rgb(64, 49, 126);
/* oklch */ color: oklch(37.5% 0.125 287.8);
Tailwind
colors: {
  custom: {
    50: '#7a6aa4',
    500: '#40317e',
    950: '#000000',
  },
}
SCSS
$custom: #40317e;
$custom-light: #7a6aa4;
$custom-dark: #000000;
JSON
{
  "hex": "#40317e",
  "rgb": {
    "r": 64,
    "g": 49,
    "b": 126
  },
  "hsl": {
    "h": 251.688,
    "s": 44,
    "l": 34.314
  },
  "oklch": {
    "l": 0.37482,
    "c": 0.1248,
    "h": 287.8
  },
  "luminance": 0.04793
}

Semantic roles & 50–950 ramp

primary
#40317E
secondary
#9CAB60
accent
#D454BB
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A060F
muted
#7C7A7F

Preview Lab

Preview with #40317E

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

Preview Lab → · Contrast checker → · Palette generator →

#40317E Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva