#40317B#40317B

#40317B is a dark, vivid violet. Relative luminance 0.047; OKLCH L 37.2% C 0.121 H 288.5°. Best body text is #FFFFFF at 10.81:1 contrast (WCAG AA passes).

Color values

HEX#40317B
RGBrgb(64, 49, 123)
HSLhsl(252, 43%, 34%)
HSVhsv(252, 60%, 48%)
CMYKcmyk(48%, 60.2%, 0%, 51.8%)
CIE-LABlab(25.91, 26.78, -40.06)
CIE-LCHlch(25.91, 48.19, 303.76°)
OKLaboklab(37.25% 0.0382 -0.1143)
OKLCHoklch(37.25% 0.121 288.5)
XYZxyz(6.7868, 4.7164, 19.2878)
Luminance0.0472 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40317B #6C7B31
analogous
#31477B #40317B #65317B
triadic
#40317B #7B4031 #317B40
tetradic
#40317B #7B3147 #6C7B31 #317B65
square
#40317B #7B3147 #6C7B31 #317B65
split-complementary
#40317B #7B6531 #477B31
monochromatic
#120E23 #29204F #40317B #5742A7 #7865C2

Accessibility & contrast

On white

10.81
#40317B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.94
#40317B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40317B
10.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40317B#FFFFFF#000000##FFFFFF
##40317B1.0010.811.9410.81
#FFFFFF10.811.0021.001.00
#0000001.9421.001.0021.00
##FFFFFF10.811.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F7D
Deuteranopia (green-blind)
#003B79
Tritanopia (blue-blind)
#2D4251
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #40317b;
/* rgb */ color: rgb(64, 49, 123);
/* oklch */ color: oklch(37.2% 0.121 288.5);
Tailwind
colors: {
  custom: {
    50: '#7a69a2',
    500: '#40317b',
    950: '#000000',
  },
}
SCSS
$custom: #40317b;
$custom-light: #7a69a2;
$custom-dark: #000000;
JSON
{
  "hex": "#40317b",
  "rgb": {
    "r": 64,
    "g": 49,
    "b": 123
  },
  "hsl": {
    "h": 252.162,
    "s": 43.023,
    "l": 33.725
  },
  "oklch": {
    "l": 0.37246,
    "c": 0.12054,
    "h": 288.5
  },
  "luminance": 0.04717
}

Semantic roles & 50–950 ramp

primary
#40317B
secondary
#9AA95F
accent
#D355B9
background
#F7F6FA
surface
#EEEBF3
border
#C9C6CD
text
#09060F
muted
#7B7A7F

Preview Lab

Preview with #40317B

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

Preview Lab → · Contrast checker → · Palette generator →

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