#40288A#40288A

#40288A is a dark, vivid violet. Relative luminance 0.044; OKLCH L 37.0% C 0.153 H 287.7°. Best body text is #FFFFFF at 11.12:1 contrast (WCAG AA passes).

Color values

HEX#40288A
RGBrgb(64, 40, 138)
HSLhsl(255, 55%, 35%)
HSVhsv(255, 71%, 54%)
CMYKcmyk(53.6%, 71%, 0%, 45.9%)
CIE-LABlab(25.08, 36.99, -50.82)
CIE-LCHlch(25.08, 62.86, 306.05°)
OKLaboklab(37.03% 0.0466 -0.146)
OKLCHoklch(37.03% 0.153 287.7)
XYZxyz(7.4592, 4.4422, 24.5042)
Luminance0.0444 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40288A #728A28
analogous
#28418A #40288A #71288A
triadic
#40288A #8A4028 #288A40
tetradic
#40288A #8A2841 #728A28 #288A71
square
#40288A #8A2841 #728A28 #288A71
split-complementary
#40288A #8A7128 #418A28
monochromatic
#140C2B #2A1A5B #40288A #5636B9 #795DD0

Accessibility & contrast

On white

11.12
#40288A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.89
#40288A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40288A
11.12:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40288A#FFFFFF#000000##FFFFFF
##40288A1.0011.121.8911.12
#FFFFFF11.121.0021.001.00
#0000001.8921.001.0021.00
##FFFFFF11.121.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E8D
Deuteranopia (green-blind)
#003988
Tritanopia (blue-blind)
#244156
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #40288a;
/* rgb */ color: rgb(64, 40, 138);
/* oklch */ color: oklch(37.0% 0.153 287.7);
Tailwind
colors: {
  custom: {
    50: '#7d64ad',
    500: '#40288a',
    950: '#000000',
  },
}
SCSS
$custom: #40288a;
$custom-light: #7d64ad;
$custom-dark: #000000;
JSON
{
  "hex": "#40288a",
  "rgb": {
    "r": 64,
    "g": 40,
    "b": 138
  },
  "hsl": {
    "h": 254.694,
    "s": 55.056,
    "l": 34.902
  },
  "oklch": {
    "l": 0.37028,
    "c": 0.15322,
    "h": 287.7
  },
  "luminance": 0.04443
}

Semantic roles & 50–950 ramp

primary
#40288A
secondary
#9FB559
accent
#DE49BA
background
#F8F6FA
surface
#EFEBF4
border
#CAC6CE
text
#0A0510
muted
#7C7A7F

Preview Lab

Preview with #40288A

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

Preview Lab → · Contrast checker → · Palette generator →

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