#40197A#40197A

#40197A is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.5% C 0.151 H 295.1°. Best body text is #FFFFFF at 12.82:1 contrast (WCAG AA passes).

Color values

HEX#40197A
RGBrgb(64, 25, 122)
HSLhsl(264, 66%, 29%)
HSVhsv(264, 80%, 48%)
CMYKcmyk(47.5%, 79.5%, 0%, 52.2%)
CIE-LABlab(20.79, 40.22, -47.76)
CIE-LCHlch(20.79, 62.44, 310.10°)
OKLaboklab(33.54% 0.0643 -0.1369)
OKLCHoklch(33.54% 0.151 295.1)
XYZxyz(5.9739, 3.1902, 18.7096)
Luminance0.0319 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40197A #537A19
analogous
#19237A #40197A #71197A
triadic
#40197A #7A4019 #197A40
tetradic
#40197A #7A1923 #537A19 #197A71
square
#40197A #7A1923 #537A19 #197A71
split-complementary
#40197A #7A7119 #237A19
monochromatic
#0D0519 #250F47 #40197A #5B23AD #7737D6

Accessibility & contrast

On white

12.82
#40197A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.64
#40197A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40197A
12.82:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40197A#FFFFFF#000000##FFFFFF
##40197A1.0012.821.6412.82
#FFFFFF12.821.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.821.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00337D
Deuteranopia (green-blind)
#003078
Tritanopia (blue-blind)
#2F3449
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #40197a;
/* rgb */ color: rgb(64, 25, 122);
/* oklch */ color: oklch(33.5% 0.151 295.1);
Tailwind
colors: {
  custom: {
    50: '#7b5ba1',
    500: '#40197a',
    950: '#000000',
  },
}
SCSS
$custom: #40197a;
$custom-light: #7b5ba1;
$custom-dark: #000000;
JSON
{
  "hex": "#40197a",
  "rgb": {
    "r": 64,
    "g": 25,
    "b": 122
  },
  "hsl": {
    "h": 264.124,
    "s": 65.986,
    "l": 28.824
  },
  "oklch": {
    "l": 0.33536,
    "c": 0.15122,
    "h": 295.1
  },
  "luminance": 0.0319
}

Semantic roles & 50–950 ramp

primary
#40197A
secondary
#82AF40
accent
#E93FA5
background
#F7F5FA
surface
#EEE9F3
border
#C9C5CD
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #40197A

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

Preview Lab → · Contrast checker → · Palette generator →

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