#40289D#40289D

#40289D is a dark, vivid violet. Relative luminance 0.050; OKLCH L 38.8% C 0.177 H 283.9°. Best body text is #FFFFFF at 10.46:1 contrast (WCAG AA passes).

Color values

HEX#40289D
RGBrgb(64, 40, 157)
HSLhsl(252, 59%, 39%)
HSVhsv(252, 75%, 62%)
CMYKcmyk(59.2%, 74.5%, 0%, 38.4%)
CIE-LABlab(26.85, 42.83, -59.63)
CIE-LCHlch(26.85, 73.42, 305.69°)
OKLaboklab(38.83% 0.0425 -0.1718)
OKLCHoklch(38.83% 0.177 283.9)
XYZxyz(8.9571, 5.0413, 32.3928)
Luminance0.0504 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40289D #859D28
analogous
#284A9D #40289D #7A289D
triadic
#40289D #9D4028 #289D40
tetradic
#40289D #9D284A #859D28 #289D7A
square
#40289D #9D284A #859D28 #289D7A
split-complementary
#40289D #9D7A28 #4A9D28
monochromatic
#180F3B #2C1C6C #40289D #5536CC #7E67D8

Accessibility & contrast

On white

10.46
#40289D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.01
#40289D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40289D
10.46:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40289D#FFFFFF#000000##FFFFFF
##40289D1.0010.462.0110.46
#FFFFFF10.461.0021.001.00
#0000002.0121.001.0021.00
##FFFFFF10.461.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0043A0
Deuteranopia (green-blind)
#003C9B
Tritanopia (blue-blind)
#084860
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #40289d;
/* rgb */ color: rgb(64, 40, 157);
/* oklch */ color: oklch(38.8% 0.177 283.9);
Tailwind
colors: {
  custom: {
    50: '#8065bb',
    500: '#40289d',
    950: '#000000',
  },
}
SCSS
$custom: #40289d;
$custom-light: #8065bb;
$custom-dark: #000000;
JSON
{
  "hex": "#40289d",
  "rgb": {
    "r": 64,
    "g": 40,
    "b": 157
  },
  "hsl": {
    "h": 252.308,
    "s": 59.391,
    "l": 38.627
  },
  "oklch": {
    "l": 0.38828,
    "c": 0.17696,
    "h": 283.9
  },
  "luminance": 0.05042
}

Semantic roles & 50–950 ramp

primary
#40289D
secondary
#ACBE62
accent
#E345C2
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #40289D

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

Preview Lab → · Contrast checker → · Palette generator →

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