#40137E#40137E

#40137E is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.3% C 0.162 H 294.7°. Best body text is #FFFFFF at 13.02:1 contrast (WCAG AA passes).

Color values

HEX#40137E
RGBrgb(64, 19, 126)
HSLhsl(265, 74%, 28%)
HSVhsv(265, 85%, 49%)
CMYKcmyk(49.2%, 84.9%, 0%, 50.6%)
CIE-LABlab(20.29, 43.90, -51.13)
CIE-LCHlch(20.29, 67.39, 310.65°)
OKLaboklab(33.31% 0.0676 -0.1467)
OKLCHoklch(33.31% 0.162 294.7)
XYZxyz(6.1121, 3.0619, 20.0036)
Luminance0.0306 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40137E #517E13
analogous
#131B7E #40137E #75137E
triadic
#40137E #7E4013 #137E40
tetradic
#40137E #7E131B #517E13 #137E75
square
#40137E #7E131B #517E13 #137E75
split-complementary
#40137E #7E7513 #1B7E13
monochromatic
#0E041B #250B49 #40137E #5B1BB3 #772CDF

Accessibility & contrast

On white

13.02
#40137E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.61
#40137E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40137E
13.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40137E#FFFFFF#000000##FFFFFF
##40137E1.0013.021.6113.02
#FFFFFF13.021.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.021.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #40137e;
/* rgb */ color: rgb(64, 19, 126);
/* oklch */ color: oklch(33.3% 0.162 294.7);
Tailwind
colors: {
  custom: {
    50: '#7c58a4',
    500: '#40137e',
    950: '#000000',
  },
}
SCSS
$custom: #40137e;
$custom-light: #7c58a4;
$custom-dark: #000000;
JSON
{
  "hex": "#40137e",
  "rgb": {
    "r": 64,
    "g": 19,
    "b": 126
  },
  "hsl": {
    "h": 265.234,
    "s": 73.793,
    "l": 28.431
  },
  "oklch": {
    "l": 0.33309,
    "c": 0.16154,
    "h": 294.7
  },
  "luminance": 0.03062
}

Semantic roles & 50–950 ramp

primary
#40137E
secondary
#80B439
accent
#F037A3
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #40137E

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

Preview Lab → · Contrast checker → · Palette generator →

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