#40287D#40287D

#40287D is a dark, vivid violet. Relative luminance 0.041; OKLCH L 35.9% C 0.136 H 290.9°. Best body text is #FFFFFF at 11.55:1 contrast (WCAG AA passes).

Color values

HEX#40287D
RGBrgb(64, 40, 125)
HSLhsl(257, 52%, 32%)
HSVhsv(257, 68%, 49%)
CMYKcmyk(48.8%, 68%, 0%, 51%)
CIE-LABlab(23.96, 33.00, -44.49)
CIE-LCHlch(23.96, 55.39, 306.56°)
OKLaboklab(35.87% 0.0486 -0.1274)
OKLCHoklch(35.87% 0.136 290.9)
XYZxyz(6.5738, 4.0880, 19.8408)
Luminance0.0409 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40287D #657D28
analogous
#283B7D #40287D #6A287D
triadic
#40287D #7D4028 #287D40
tetradic
#40287D #7D283B #657D28 #287D6A
square
#40287D #7D283B #657D28 #287D6A
split-complementary
#40287D #7D6A28 #3B7D28
monochromatic
#110A20 #28194F #40287D #5837AB #7756C9

Accessibility & contrast

On white

11.55
#40287D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.82
#40287D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40287D
11.55:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40287D#FFFFFF#000000##FFFFFF
##40287D1.0011.551.8211.55
#FFFFFF11.551.0021.001.00
#0000001.8221.001.0021.00
##FFFFFF11.551.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A80
Deuteranopia (green-blind)
#00377B
Tritanopia (blue-blind)
#2D3D4F
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #40287d;
/* rgb */ color: rgb(64, 40, 125);
/* oklch */ color: oklch(35.9% 0.136 290.9);
Tailwind
colors: {
  custom: {
    50: '#7b63a3',
    500: '#40287d',
    950: '#000000',
  },
}
SCSS
$custom: #40287d;
$custom-light: #7b63a3;
$custom-dark: #000000;
JSON
{
  "hex": "#40287d",
  "rgb": {
    "r": 64,
    "g": 40,
    "b": 125
  },
  "hsl": {
    "h": 256.941,
    "s": 51.515,
    "l": 32.353
  },
  "oklch": {
    "l": 0.35873,
    "c": 0.13634,
    "h": 290.9
  },
  "luminance": 0.04088
}

Semantic roles & 50–950 ramp

primary
#40287D
secondary
#94AE53
accent
#DB4DB3
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A050F
muted
#7C7A7F

Preview Lab

Preview with #40287D

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

Preview Lab → · Contrast checker → · Palette generator →

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