#40147F#40147F

#40147F is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.5% C 0.162 H 294.3°. Best body text is #FFFFFF at 12.93:1 contrast (WCAG AA passes).

Color values

HEX#40147F
RGBrgb(64, 20, 127)
HSLhsl(265, 73%, 29%)
HSVhsv(265, 84%, 50%)
CMYKcmyk(49.6%, 84.3%, 0%, 50.2%)
CIE-LABlab(20.53, 43.76, -51.37)
CIE-LCHlch(20.53, 67.49, 310.43°)
OKLaboklab(33.5% 0.0665 -0.1474)
OKLCHoklch(33.5% 0.162 294.3)
XYZxyz(6.1942, 3.1224, 20.3509)
Luminance0.0312 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40147F #537F14
analogous
#141E7F #40147F #76147F
triadic
#40147F #7F4014 #147F40
tetradic
#40147F #7F141E #537F14 #147F76
square
#40147F #7F141E #537F14 #147F76
split-complementary
#40147F #7F7614 #1E7F14
monochromatic
#0D041A #250C4A #40147F #5B1CB4 #772FDE

Accessibility & contrast

On white

12.93
#40147F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.62
#40147F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40147F
12.93:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40147F#FFFFFF#000000##FFFFFF
##40147F1.0012.931.6212.93
#FFFFFF12.931.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF12.931.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003282
Deuteranopia (green-blind)
#00307D
Tritanopia (blue-blind)
#2D344B
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #40147f;
/* rgb */ color: rgb(64, 20, 127);
/* oklch */ color: oklch(33.5% 0.162 294.3);
Tailwind
colors: {
  custom: {
    50: '#7c58a5',
    500: '#40147f',
    950: '#000000',
  },
}
SCSS
$custom: #40147f;
$custom-light: #7c58a5;
$custom-dark: #000000;
JSON
{
  "hex": "#40147f",
  "rgb": {
    "r": 64,
    "g": 20,
    "b": 127
  },
  "hsl": {
    "h": 264.673,
    "s": 72.789,
    "l": 28.824
  },
  "oklch": {
    "l": 0.33504,
    "c": 0.16176,
    "h": 294.3
  },
  "luminance": 0.03123
}

Semantic roles & 50–950 ramp

primary
#40147F
secondary
#82B43B
accent
#EF38A4
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #40147F

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

Preview Lab → · Contrast checker → · Palette generator →

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