#40197E#40197E

#40197E is a dark, vivid violet. Relative luminance 0.033; OKLCH L 33.9% C 0.156 H 293.9°. Best body text is #FFFFFF at 12.66:1 contrast (WCAG AA passes).

Color values

HEX#40197E
RGBrgb(64, 25, 126)
HSLhsl(263, 67%, 30%)
HSVhsv(263, 80%, 49%)
CMYKcmyk(49.2%, 80.2%, 0%, 50.6%)
CIE-LABlab(21.18, 41.33, -49.67)
CIE-LCHlch(21.18, 64.62, 309.76°)
OKLaboklab(33.92% 0.0631 -0.1425)
OKLCHoklch(33.92% 0.156 293.9)
XYZxyz(6.2268, 3.2914, 20.0418)
Luminance0.0329 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40197E #577E19
analogous
#19257E #40197E #72197E
triadic
#40197E #7E4019 #197E40
tetradic
#40197E #7E1925 #577E19 #197E72
square
#40197E #7E1925 #577E19 #197E72
split-complementary
#40197E #7E7219 #257E19
monochromatic
#0D051A #260F4B #40197E #5A23B1 #773AD8

Accessibility & contrast

On white

12.66
#40197E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.66
#40197E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40197E
12.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40197E#FFFFFF#000000##FFFFFF
##40197E1.0012.661.6612.66
#FFFFFF12.661.0021.001.00
#0000001.6621.001.0021.00
##FFFFFF12.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003481
Deuteranopia (green-blind)
#00317C
Tritanopia (blue-blind)
#2D354B
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #40197e;
/* rgb */ color: rgb(64, 25, 126);
/* oklch */ color: oklch(33.9% 0.156 293.9);
Tailwind
colors: {
  custom: {
    50: '#7c5ba4',
    500: '#40197e',
    950: '#000000',
  },
}
SCSS
$custom: #40197e;
$custom-light: #7c5ba4;
$custom-dark: #000000;
JSON
{
  "hex": "#40197e",
  "rgb": {
    "r": 64,
    "g": 25,
    "b": 126
  },
  "hsl": {
    "h": 263.168,
    "s": 66.887,
    "l": 29.608
  },
  "oklch": {
    "l": 0.33923,
    "c": 0.15583,
    "h": 293.9
  },
  "luminance": 0.03292
}

Semantic roles & 50–950 ramp

primary
#40197E
secondary
#86B241
accent
#EA3EA7
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #40197E

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

Preview Lab → · Contrast checker → · Palette generator →

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