#40197C#40197C

#40197C is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.7% C 0.154 H 294.5°. Best body text is #FFFFFF at 12.74:1 contrast (WCAG AA passes).

Color values

HEX#40197C
RGBrgb(64, 25, 124)
HSLhsl(264, 66%, 29%)
HSVhsv(264, 80%, 49%)
CMYKcmyk(48.4%, 79.8%, 0%, 51.4%)
CIE-LABlab(20.98, 40.77, -48.72)
CIE-LCHlch(20.98, 63.53, 309.93°)
OKLaboklab(33.73% 0.0637 -0.1397)
OKLCHoklch(33.73% 0.154 294.5)
XYZxyz(6.0991, 3.2403, 19.3690)
Luminance0.0324 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40197C #557C19
analogous
#19247C #40197C #72197C
triadic
#40197C #7C4019 #197C40
tetradic
#40197C #7C1924 #557C19 #197C72
square
#40197C #7C1924 #557C19 #197C72
split-complementary
#40197C #7C7219 #247C19
monochromatic
#0D0519 #260F49 #40197C #5A23AF #7738D7

Accessibility & contrast

On white

12.74
#40197C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40197C
12.74:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40197C#FFFFFF#000000##FFFFFF
##40197C1.0012.741.6512.74
#FFFFFF12.741.0021.001.00
#0000001.6521.001.0021.00
##FFFFFF12.741.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00337F
Deuteranopia (green-blind)
#00317A
Tritanopia (blue-blind)
#2E344A
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #40197c;
/* rgb */ color: rgb(64, 25, 124);
/* oklch */ color: oklch(33.7% 0.154 294.5);
Tailwind
colors: {
  custom: {
    50: '#7c5ba3',
    500: '#40197c',
    950: '#000000',
  },
}
SCSS
$custom: #40197c;
$custom-light: #7c5ba3;
$custom-dark: #000000;
JSON
{
  "hex": "#40197c",
  "rgb": {
    "r": 64,
    "g": 25,
    "b": 124
  },
  "hsl": {
    "h": 263.636,
    "s": 66.443,
    "l": 29.216
  },
  "oklch": {
    "l": 0.33729,
    "c": 0.15353,
    "h": 294.5
  },
  "luminance": 0.0324
}

Semantic roles & 50–950 ramp

primary
#40197C
secondary
#84B040
accent
#E93EA6
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #40197C

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

Preview Lab → · Contrast checker → · Palette generator →

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