#40316B#40316B

#40316B is a dark, moderate violet. Relative luminance 0.043; OKLCH L 36.1% C 0.097 H 292.8°. Best body text is #FFFFFF at 11.23:1 contrast (WCAG AA passes).

Color values

HEX#40316B
RGBrgb(64, 49, 107)
HSLhsl(256, 37%, 31%)
HSVhsv(256, 54%, 42%)
CMYKcmyk(40.2%, 54.2%, 0%, 58%)
CIE-LABlab(24.79, 21.77, -31.66)
CIE-LCHlch(24.79, 38.42, 304.52°)
OKLaboklab(36.06% 0.0377 -0.0896)
OKLCHoklch(36.06% 0.097 292.8)
XYZxyz(5.8658, 4.3480, 14.4373)
Luminance0.0435 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40316B #5C6B31
analogous
#313F6B #40316B #5D316B
triadic
#40316B #6B4031 #316B40
tetradic
#40316B #6B313F #5C6B31 #316B5D
square
#40316B #6B313F #5C6B31 #316B5D
split-complementary
#40316B #6B5D31 #3F6B31
monochromatic
#0E0B17 #271E41 #40316B #594495 #7660B6

Accessibility & contrast

On white

11.23
#40316B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.87
#40316B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40316B
11.23:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40316B#FFFFFF#000000##FFFFFF
##40316B1.0011.231.8711.23
#FFFFFF11.231.0021.001.00
#0000001.8721.001.0021.00
##FFFFFF11.231.0021.001.00

Color blindness preview

Protanopia (red-blind)
#193C6D
Deuteranopia (green-blind)
#1C3A6A
Tritanopia (blue-blind)
#353D49
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #40316b;
/* rgb */ color: rgb(64, 49, 107);
/* oklch */ color: oklch(36.1% 0.097 292.8);
Tailwind
colors: {
  custom: {
    50: '#786996',
    500: '#40316b',
    950: '#000000',
  },
}
SCSS
$custom: #40316b;
$custom-light: #786996;
$custom-dark: #000000;
JSON
{
  "hex": "#40316b",
  "rgb": {
    "r": 64,
    "g": 49,
    "b": 107
  },
  "hsl": {
    "h": 255.517,
    "s": 37.179,
    "l": 30.588
  },
  "oklch": {
    "l": 0.36056,
    "c": 0.09723,
    "h": 292.8
  },
  "luminance": 0.04348
}

Semantic roles & 50–950 ramp

primary
#40316B
secondary
#8B9C5C
accent
#CD5BB0
background
#F7F6F9
surface
#EDEBF2
border
#C8C6CC
text
#09060D
muted
#7B7A7E

Preview Lab

Preview with #40316B

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

Preview Lab → · Contrast checker → · Palette generator →

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