#40157B#40157B

#40157B is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.2% C 0.156 H 295.5°. Best body text is #FFFFFF at 13.03:1 contrast (WCAG AA passes).

Color values

HEX#40157B
RGBrgb(64, 21, 123)
HSLhsl(265, 71%, 28%)
HSVhsv(265, 83%, 48%)
CMYKcmyk(48%, 82.9%, 0%, 51.8%)
CIE-LABlab(20.27, 42.28, -49.25)
CIE-LCHlch(20.27, 64.91, 310.64°)
OKLaboklab(33.2% 0.0672 -0.1412)
OKLCHoklch(33.2% 0.156 295.5)
XYZxyz(5.9567, 3.0562, 19.0111)
Luminance0.0306 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40157B #507B15
analogous
#151D7B #40157B #73157B
triadic
#40157B #7B4015 #157B40
tetradic
#40157B #7B151D #507B15 #157B73
square
#40157B #7B151D #507B15 #157B73
split-complementary
#40157B #7B7315 #1D7B15
monochromatic
#0E041A #250C47 #40157B #5B1EAF #782FDB

Accessibility & contrast

On white

13.03
#40157B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.61
#40157B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40157B
13.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40157B#FFFFFF#000000##FFFFFF
##40157B1.0013.031.6113.03
#FFFFFF13.031.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.031.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00327E
Deuteranopia (green-blind)
#002F79
Tritanopia (blue-blind)
#2F3248
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #40157b;
/* rgb */ color: rgb(64, 21, 123);
/* oklch */ color: oklch(33.2% 0.156 295.5);
Tailwind
colors: {
  custom: {
    50: '#7c59a2',
    500: '#40157b',
    950: '#000000',
  },
}
SCSS
$custom: #40157b;
$custom-light: #7c59a2;
$custom-dark: #000000;
JSON
{
  "hex": "#40157b",
  "rgb": {
    "r": 64,
    "g": 21,
    "b": 123
  },
  "hsl": {
    "h": 265.294,
    "s": 70.833,
    "l": 28.235
  },
  "oklch": {
    "l": 0.33202,
    "c": 0.15642,
    "h": 295.5
  },
  "luminance": 0.03056
}

Semantic roles & 50–950 ramp

primary
#40157B
secondary
#7FB03B
accent
#EE3AA2
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #40157B

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

Preview Lab → · Contrast checker → · Palette generator →

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