#40287C#40287C

#40287C is a dark, vivid violet. Relative luminance 0.041; OKLCH L 35.8% C 0.135 H 291.2°. Best body text is #FFFFFF at 11.59:1 contrast (WCAG AA passes).

Color values

HEX#40287C
RGBrgb(64, 40, 124)
HSLhsl(257, 51%, 32%)
HSVhsv(257, 68%, 49%)
CMYKcmyk(48.4%, 67.7%, 0%, 51.4%)
CIE-LABlab(23.88, 32.69, -43.99)
CIE-LCHlch(23.88, 54.81, 306.62°)
OKLaboklab(35.79% 0.0488 -0.1259)
OKLCHoklch(35.79% 0.135 291.2)
XYZxyz(6.5102, 4.0626, 19.5060)
Luminance0.0406 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40287C #647C28
analogous
#283A7C #40287C #6A287C
triadic
#40287C #7C4028 #287C40
tetradic
#40287C #7C283A #647C28 #287C6A
square
#40287C #7C283A #647C28 #287C6A
split-complementary
#40287C #7C6A28 #3A7C28
monochromatic
#100A1F #28194E #40287C #5837AA #7756C8

Accessibility & contrast

On white

11.59
#40287C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.81
#40287C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40287C
11.59:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40287C#FFFFFF#000000##FFFFFF
##40287C1.0011.591.8111.59
#FFFFFF11.591.0021.001.00
#0000001.8121.001.0021.00
##FFFFFF11.591.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A7F
Deuteranopia (green-blind)
#00377A
Tritanopia (blue-blind)
#2D3C4E
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #40287c;
/* rgb */ color: rgb(64, 40, 124);
/* oklch */ color: oklch(35.8% 0.135 291.2);
Tailwind
colors: {
  custom: {
    50: '#7a63a3',
    500: '#40287c',
    950: '#000000',
  },
}
SCSS
$custom: #40287c;
$custom-light: #7a63a3;
$custom-dark: #000000;
JSON
{
  "hex": "#40287c",
  "rgb": {
    "r": 64,
    "g": 40,
    "b": 124
  },
  "hsl": {
    "h": 257.143,
    "s": 51.22,
    "l": 32.157
  },
  "oklch": {
    "l": 0.35787,
    "c": 0.13502,
    "h": 291.2
  },
  "luminance": 0.04063
}

Semantic roles & 50–950 ramp

primary
#40287C
secondary
#93AD52
accent
#DB4DB2
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A050F
muted
#7C7A7F

Preview Lab

Preview with #40287C

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

Preview Lab → · Contrast checker → · Palette generator →

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