#40318B#40318B

#40318B is a dark, vivid violet. Relative luminance 0.052; OKLCH L 38.6% C 0.143 H 285.1°. Best body text is #FFFFFF at 10.34:1 contrast (WCAG AA passes).

Color values

HEX#40318B
RGBrgb(64, 49, 139)
HSLhsl(250, 48%, 37%)
HSVhsv(250, 65%, 55%)
CMYKcmyk(54%, 64.7%, 0%, 45.5%)
CIE-LABlab(27.16, 31.91, -48.06)
CIE-LCHlch(27.16, 57.69, 303.59°)
OKLaboklab(38.55% 0.0373 -0.1378)
OKLCHoklch(38.55% 0.143 285.1)
XYZxyz(7.8715, 5.1503, 25.0004)
Luminance0.0515 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40318B #7C8B31
analogous
#314F8B #40318B #6D318B
triadic
#40318B #8B4031 #318B40
tetradic
#40318B #8B314F #7C8B31 #318B6D
square
#40318B #8B314F #7C8B31 #318B6D
split-complementary
#40318B #8B6D31 #4F8B31
monochromatic
#161131 #2B215E #40318B #5541B8 #7B6BCB

Accessibility & contrast

On white

10.34
#40318B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.03
#40318B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40318B
10.34:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40318B#FFFFFF#000000##FFFFFF
##40318B1.0010.342.0310.34
#FFFFFF10.341.0021.001.00
#0000002.0321.001.0021.00
##FFFFFF10.341.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00438E
Deuteranopia (green-blind)
#003D89
Tritanopia (blue-blind)
#224759
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #40318b;
/* rgb */ color: rgb(64, 49, 139);
/* oklch */ color: oklch(38.6% 0.143 285.1);
Tailwind
colors: {
  custom: {
    50: '#7c6aae',
    500: '#40318b',
    950: '#000000',
  },
}
SCSS
$custom: #40318b;
$custom-light: #7c6aae;
$custom-dark: #000000;
JSON
{
  "hex": "#40318b",
  "rgb": {
    "r": 64,
    "g": 49,
    "b": 139
  },
  "hsl": {
    "h": 250,
    "s": 47.872,
    "l": 36.863
  },
  "oklch": {
    "l": 0.38553,
    "c": 0.14281,
    "h": 285.1
  },
  "luminance": 0.05151
}

Semantic roles & 50–950 ramp

primary
#40318B
secondary
#A6B265
accent
#D750C1
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #40318B

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

Preview Lab → · Contrast checker → · Palette generator →

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