#40288D#40288D

#40288D is a dark, vivid violet. Relative luminance 0.045; OKLCH L 37.3% C 0.157 H 287.0°. Best body text is #FFFFFF at 11.02:1 contrast (WCAG AA passes).

Color values

HEX#40288D
RGBrgb(64, 40, 141)
HSLhsl(254, 56%, 35%)
HSVhsv(254, 72%, 55%)
CMYKcmyk(54.6%, 71.6%, 0%, 44.7%)
CIE-LABlab(25.35, 37.91, -52.25)
CIE-LCHlch(25.35, 64.55, 305.97°)
OKLaboklab(37.3% 0.046 -0.1501)
OKLCHoklch(37.3% 0.157 287)
XYZxyz(7.6794, 4.5303, 25.6639)
Luminance0.0453 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40288D #758D28
analogous
#28438D #40288D #72288D
triadic
#40288D #8D4028 #288D40
tetradic
#40288D #8D2843 #758D28 #288D72
square
#40288D #8D2843 #758D28 #288D72
split-complementary
#40288D #8D7228 #438D28
monochromatic
#150D2E #2A1A5D #40288D #5636BD #795ED1

Accessibility & contrast

On white

11.02
#40288D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40288D
11.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40288D#FFFFFF#000000##FFFFFF
##40288D1.0011.021.9111.02
#FFFFFF11.021.0021.001.00
#0000001.9121.001.0021.00
##FFFFFF11.021.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F90
Deuteranopia (green-blind)
#00398B
Tritanopia (blue-blind)
#214257
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #40288d;
/* rgb */ color: rgb(64, 40, 141);
/* oklch */ color: oklch(37.3% 0.157 287.0);
Tailwind
colors: {
  custom: {
    50: '#7d64af',
    500: '#40288d',
    950: '#000000',
  },
}
SCSS
$custom: #40288d;
$custom-light: #7d64af;
$custom-dark: #000000;
JSON
{
  "hex": "#40288d",
  "rgb": {
    "r": 64,
    "g": 40,
    "b": 141
  },
  "hsl": {
    "h": 254.257,
    "s": 55.801,
    "l": 35.49
  },
  "oklch": {
    "l": 0.37304,
    "c": 0.15704,
    "h": 287
  },
  "luminance": 0.04531
}

Semantic roles & 50–950 ramp

primary
#40288D
secondary
#A1B75A
accent
#DF49BB
background
#F8F6FA
surface
#EFEBF5
border
#CAC6CF
text
#0B0510
muted
#7C7A7F

Preview Lab

Preview with #40288D

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

Preview Lab → · Contrast checker → · Palette generator →

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