#40317C#40317C

#40317C is a dark, vivid violet. Relative luminance 0.047; OKLCH L 37.3% C 0.122 H 288.2°. Best body text is #FFFFFF at 10.78:1 contrast (WCAG AA passes).

Color values

HEX#40317C
RGBrgb(64, 49, 124)
HSLhsl(252, 43%, 34%)
HSVhsv(252, 60%, 49%)
CMYKcmyk(48.4%, 60.5%, 0%, 51.4%)
CIE-LABlab(25.99, 27.10, -40.57)
CIE-LCHlch(25.99, 48.79, 303.74°)
OKLaboklab(37.32% 0.0382 -0.1158)
OKLCHoklch(37.32% 0.122 288.2)
XYZxyz(6.8497, 4.7416, 19.6192)
Luminance0.0474 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40317C #6D7C31
analogous
#31487C #40317C #66317C
triadic
#40317C #7C4031 #317C40
tetradic
#40317C #7C3148 #6D7C31 #317C66
square
#40317C #7C3148 #6D7C31 #317C66
split-complementary
#40317C #7C6631 #487C31
monochromatic
#130E24 #292050 #40317C #5742A8 #7865C2

Accessibility & contrast

On white

10.78
#40317C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.95
#40317C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40317C
10.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40317C#FFFFFF#000000##FFFFFF
##40317C1.0010.781.9510.78
#FFFFFF10.781.0021.001.00
#0000001.9521.001.0021.00
##FFFFFF10.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F7E
Deuteranopia (green-blind)
#003C7A
Tritanopia (blue-blind)
#2D4251
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #40317c;
/* rgb */ color: rgb(64, 49, 124);
/* oklch */ color: oklch(37.3% 0.122 288.2);
Tailwind
colors: {
  custom: {
    50: '#7a69a2',
    500: '#40317c',
    950: '#000000',
  },
}
SCSS
$custom: #40317c;
$custom-light: #7a69a2;
$custom-dark: #000000;
JSON
{
  "hex": "#40317c",
  "rgb": {
    "r": 64,
    "g": 49,
    "b": 124
  },
  "hsl": {
    "h": 252,
    "s": 43.353,
    "l": 33.922
  },
  "oklch": {
    "l": 0.37324,
    "c": 0.12197,
    "h": 288.2
  },
  "luminance": 0.04742
}

Semantic roles & 50–950 ramp

primary
#40317C
secondary
#9BAA5F
accent
#D355BA
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A060F
muted
#7C7A7F

Preview Lab

Preview with #40317C

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

Preview Lab → · Contrast checker → · Palette generator →

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