#40197B#40197B

#40197B is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.6% C 0.152 H 294.8°. Best body text is #FFFFFF at 12.78:1 contrast (WCAG AA passes).

Color values

HEX#40197B
RGBrgb(64, 25, 123)
HSLhsl(264, 66%, 29%)
HSVhsv(264, 80%, 48%)
CMYKcmyk(48%, 79.7%, 0%, 51.8%)
CIE-LABlab(20.89, 40.50, -48.24)
CIE-LCHlch(20.89, 62.98, 310.01°)
OKLaboklab(33.63% 0.064 -0.1383)
OKLCHoklch(33.63% 0.152 294.8)
XYZxyz(6.0362, 3.2151, 19.0376)
Luminance0.0321 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40197B #547B19
analogous
#19237B #40197B #71197B
triadic
#40197B #7B4019 #197B40
tetradic
#40197B #7B1923 #547B19 #197B71
square
#40197B #7B1923 #547B19 #197B71
split-complementary
#40197B #7B7119 #237B19
monochromatic
#0D0519 #260F48 #40197B #5A23AE #7738D7

Accessibility & contrast

On white

12.78
#40197B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40197B
12.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40197B#FFFFFF#000000##FFFFFF
##40197B1.0012.781.6412.78
#FFFFFF12.781.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.781.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #40197b;
/* rgb */ color: rgb(64, 25, 123);
/* oklch */ color: oklch(33.6% 0.152 294.8);
Tailwind
colors: {
  custom: {
    50: '#7c5ba2',
    500: '#40197b',
    950: '#000000',
  },
}
SCSS
$custom: #40197b;
$custom-light: #7c5ba2;
$custom-dark: #000000;
JSON
{
  "hex": "#40197b",
  "rgb": {
    "r": 64,
    "g": 25,
    "b": 123
  },
  "hsl": {
    "h": 263.878,
    "s": 66.216,
    "l": 29.02
  },
  "oklch": {
    "l": 0.33633,
    "c": 0.15238,
    "h": 294.8
  },
  "luminance": 0.03215
}

Semantic roles & 50–950 ramp

primary
#40197B
secondary
#83AF40
accent
#E93FA5
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #40197B

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

Preview Lab → · Contrast checker → · Palette generator →

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