#40318A#40318A

#40318A is a dark, vivid violet. Relative luminance 0.051; OKLCH L 38.5% C 0.141 H 285.3°. Best body text is #FFFFFF at 10.37:1 contrast (WCAG AA passes).

Color values

HEX#40318A
RGBrgb(64, 49, 138)
HSLhsl(250, 48%, 37%)
HSVhsv(250, 64%, 54%)
CMYKcmyk(53.6%, 64.5%, 0%, 45.9%)
CIE-LABlab(27.08, 31.59, -47.57)
CIE-LCHlch(27.08, 57.10, 303.59°)
OKLaboklab(38.47% 0.0374 -0.1364)
OKLCHoklch(38.47% 0.141 285.3)
XYZxyz(7.7987, 5.1212, 24.6174)
Luminance0.0512 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40318A #7B8A31
analogous
#314F8A #40318A #6D318A
triadic
#40318A #8A4031 #318A40
tetradic
#40318A #8A314F #7B8A31 #318A6D
square
#40318A #8A314F #7B8A31 #318A6D
split-complementary
#40318A #8A6D31 #4F8A31
monochromatic
#161130 #2B215D #40318A #5541B7 #7B6BCA

Accessibility & contrast

On white

10.37
#40318A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.02
#40318A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40318A
10.37:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40318A#FFFFFF#000000##FFFFFF
##40318A1.0010.372.0210.37
#FFFFFF10.371.0021.001.00
#0000002.0221.001.0021.00
##FFFFFF10.371.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00428D
Deuteranopia (green-blind)
#003D88
Tritanopia (blue-blind)
#234658
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #40318a;
/* rgb */ color: rgb(64, 49, 138);
/* oklch */ color: oklch(38.5% 0.141 285.3);
Tailwind
colors: {
  custom: {
    50: '#7c6aad',
    500: '#40318a',
    950: '#000000',
  },
}
SCSS
$custom: #40318a;
$custom-light: #7c6aad;
$custom-dark: #000000;
JSON
{
  "hex": "#40318a",
  "rgb": {
    "r": 64,
    "g": 49,
    "b": 138
  },
  "hsl": {
    "h": 250.112,
    "s": 47.594,
    "l": 36.667
  },
  "oklch": {
    "l": 0.38468,
    "c": 0.14146,
    "h": 285.3
  },
  "luminance": 0.05122
}

Semantic roles & 50–950 ramp

primary
#40318A
secondary
#A5B265
accent
#D751C1
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #40318A

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

Preview Lab → · Contrast checker → · Palette generator →

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