#40197D#40197D

#40197D is a dark, vivid violet. Relative luminance 0.033; OKLCH L 33.8% C 0.155 H 294.2°. Best body text is #FFFFFF at 12.70:1 contrast (WCAG AA passes).

Color values

HEX#40197D
RGBrgb(64, 25, 125)
HSLhsl(263, 67%, 29%)
HSVhsv(263, 80%, 49%)
CMYKcmyk(48.8%, 80%, 0%, 51%)
CIE-LABlab(21.08, 41.05, -49.20)
CIE-LCHlch(21.08, 64.07, 309.84°)
OKLaboklab(33.83% 0.0634 -0.1411)
OKLCHoklch(33.83% 0.155 294.2)
XYZxyz(6.1626, 3.2657, 19.7037)
Luminance0.0327 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40197D #567D19
analogous
#19247D #40197D #72197D
triadic
#40197D #7D4019 #197D40
tetradic
#40197D #7D1924 #567D19 #197D72
square
#40197D #7D1924 #567D19 #197D72
split-complementary
#40197D #7D7219 #247D19
monochromatic
#0D051A #260F4A #40197D #5A23B0 #7739D7

Accessibility & contrast

On white

12.70
#40197D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.65
#40197D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40197D
12.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40197D#FFFFFF#000000##FFFFFF
##40197D1.0012.701.6512.70
#FFFFFF12.701.0021.001.00
#0000001.6521.001.0021.00
##FFFFFF12.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003480
Deuteranopia (green-blind)
#00317B
Tritanopia (blue-blind)
#2E354A
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #40197d;
/* rgb */ color: rgb(64, 25, 125);
/* oklch */ color: oklch(33.8% 0.155 294.2);
Tailwind
colors: {
  custom: {
    50: '#7c5ba4',
    500: '#40197d',
    950: '#000000',
  },
}
SCSS
$custom: #40197d;
$custom-light: #7c5ba4;
$custom-dark: #000000;
JSON
{
  "hex": "#40197d",
  "rgb": {
    "r": 64,
    "g": 25,
    "b": 125
  },
  "hsl": {
    "h": 263.4,
    "s": 66.667,
    "l": 29.412
  },
  "oklch": {
    "l": 0.33826,
    "c": 0.15468,
    "h": 294.2
  },
  "luminance": 0.03266
}

Semantic roles & 50–950 ramp

primary
#40197D
secondary
#85B140
accent
#EA3EA7
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #40197D

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

Preview Lab → · Contrast checker → · Palette generator →

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