#40288E#40288E

#40288E is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.4% C 0.158 H 286.8°. Best body text is #FFFFFF at 10.98:1 contrast (WCAG AA passes).

Color values

HEX#40288E
RGBrgb(64, 40, 142)
HSLhsl(254, 56%, 36%)
HSVhsv(254, 72%, 56%)
CMYKcmyk(54.9%, 71.8%, 0%, 44.3%)
CIE-LABlab(25.44, 38.22, -52.72)
CIE-LCHlch(25.44, 65.12, 305.94°)
OKLaboklab(37.4% 0.0458 -0.1515)
OKLCHoklch(37.4% 0.158 286.8)
XYZxyz(7.7542, 4.5602, 26.0576)
Luminance0.0456 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40288E #768E28
analogous
#28438E #40288E #73288E
triadic
#40288E #8E4028 #288E40
tetradic
#40288E #8E2843 #768E28 #288E73
square
#40288E #8E2843 #768E28 #288E73
split-complementary
#40288E #8E7328 #438E28
monochromatic
#150D2F #2A1B5E #40288E #5635BE #7A5FD2

Accessibility & contrast

On white

10.98
#40288E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.91
#40288E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40288E
10.98:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40288E#FFFFFF#000000##FFFFFF
##40288E1.0010.981.9110.98
#FFFFFF10.981.0021.001.00
#0000001.9121.001.0021.00
##FFFFFF10.981.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F91
Deuteranopia (green-blind)
#00398C
Tritanopia (blue-blind)
#204358
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #40288e;
/* rgb */ color: rgb(64, 40, 142);
/* oklch */ color: oklch(37.4% 0.158 286.8);
Tailwind
colors: {
  custom: {
    50: '#7d64b0',
    500: '#40288e',
    950: '#000000',
  },
}
SCSS
$custom: #40288e;
$custom-light: #7d64b0;
$custom-dark: #000000;
JSON
{
  "hex": "#40288e",
  "rgb": {
    "r": 64,
    "g": 40,
    "b": 142
  },
  "hsl": {
    "h": 254.118,
    "s": 56.044,
    "l": 35.686
  },
  "oklch": {
    "l": 0.37397,
    "c": 0.1583,
    "h": 286.8
  },
  "luminance": 0.04561
}

Semantic roles & 50–950 ramp

primary
#40288E
secondary
#A1B75B
accent
#DF48BC
background
#F8F6FA
surface
#EFEBF5
border
#CAC6CF
text
#0B0511
muted
#7C7A80

Preview Lab

Preview with #40288E

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

Preview Lab → · Contrast checker → · Palette generator →

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