#40197F#40197F

#40197F is a dark, vivid violet. Relative luminance 0.033; OKLCH L 34.0% C 0.157 H 293.6°. Best body text is #FFFFFF at 12.62:1 contrast (WCAG AA passes).

Color values

HEX#40197F
RGBrgb(64, 25, 127)
HSLhsl(263, 67%, 30%)
HSVhsv(263, 80%, 50%)
CMYKcmyk(49.6%, 80.3%, 0%, 50.2%)
CIE-LABlab(21.27, 41.60, -50.15)
CIE-LCHlch(21.27, 65.16, 309.68°)
OKLaboklab(34.02% 0.0627 -0.1439)
OKLCHoklch(34.02% 0.157 293.6)
XYZxyz(6.2917, 3.3174, 20.3834)
Luminance0.0332 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40197F #587F19
analogous
#19257F #40197F #73197F
triadic
#40197F #7F4019 #197F40
tetradic
#40197F #7F1925 #587F19 #197F73
square
#40197F #7F1925 #587F19 #197F73
split-complementary
#40197F #7F7319 #257F19
monochromatic
#0D051A #260F4C #40197F #5A23B2 #773AD8

Accessibility & contrast

On white

12.62
#40197F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40197F
12.62:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40197F#FFFFFF#000000##FFFFFF
##40197F1.0012.621.6612.62
#FFFFFF12.621.0021.001.00
#0000001.6621.001.0021.00
##FFFFFF12.621.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003482
Deuteranopia (green-blind)
#00317D
Tritanopia (blue-blind)
#2C364C
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #40197f;
/* rgb */ color: rgb(64, 25, 127);
/* oklch */ color: oklch(34.0% 0.157 293.6);
Tailwind
colors: {
  custom: {
    50: '#7c5ba5',
    500: '#40197f',
    950: '#000000',
  },
}
SCSS
$custom: #40197f;
$custom-light: #7c5ba5;
$custom-dark: #000000;
JSON
{
  "hex": "#40197f",
  "rgb": {
    "r": 64,
    "g": 25,
    "b": 127
  },
  "hsl": {
    "h": 262.941,
    "s": 67.105,
    "l": 29.804
  },
  "oklch": {
    "l": 0.34021,
    "c": 0.15698,
    "h": 293.6
  },
  "luminance": 0.03318
}

Semantic roles & 50–950 ramp

primary
#40197F
secondary
#87B341
accent
#EA3EA8
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #40197F

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

Preview Lab → · Contrast checker → · Palette generator →

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