#40137F#40137F

#40137F is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.4% C 0.163 H 294.4°. Best body text is #FFFFFF at 12.98:1 contrast (WCAG AA passes).

Color values

HEX#40137F
RGBrgb(64, 19, 127)
HSLhsl(265, 74%, 29%)
HSVhsv(265, 85%, 50%)
CMYKcmyk(49.6%, 85%, 0%, 50.2%)
CIE-LABlab(20.39, 44.16, -51.59)
CIE-LCHlch(20.39, 67.91, 310.56°)
OKLaboklab(33.41% 0.0672 -0.1481)
OKLCHoklch(33.41% 0.163 294.4)
XYZxyz(6.1769, 3.0879, 20.3451)
Luminance0.0309 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40137F #527F13
analogous
#131C7F #40137F #76137F
triadic
#40137F #7F4013 #137F40
tetradic
#40137F #7F131C #527F13 #137F76
square
#40137F #7F131C #527F13 #137F76
split-complementary
#40137F #7F7613 #1C7F13
monochromatic
#0D041B #250B4A #40137F #5B1BB4 #772DE0

Accessibility & contrast

On white

12.98
#40137F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40137F
12.98:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40137F#FFFFFF#000000##FFFFFF
##40137F1.0012.981.6212.98
#FFFFFF12.981.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF12.981.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003282
Deuteranopia (green-blind)
#002F7D
Tritanopia (blue-blind)
#2D334A
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #40137f;
/* rgb */ color: rgb(64, 19, 127);
/* oklch */ color: oklch(33.4% 0.163 294.4);
Tailwind
colors: {
  custom: {
    50: '#7d58a5',
    500: '#40137f',
    950: '#000000',
  },
}
SCSS
$custom: #40137f;
$custom-light: #7d58a5;
$custom-dark: #000000;
JSON
{
  "hex": "#40137f",
  "rgb": {
    "r": 64,
    "g": 19,
    "b": 127
  },
  "hsl": {
    "h": 265,
    "s": 73.973,
    "l": 28.627
  },
  "oklch": {
    "l": 0.3341,
    "c": 0.16263,
    "h": 294.4
  },
  "luminance": 0.03088
}

Semantic roles & 50–950 ramp

primary
#40137F
secondary
#81B439
accent
#F137A3
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #40137F

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

Preview Lab → · Contrast checker → · Palette generator →

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