#40289E#40289E

#40289E is a dark, vivid violet. Relative luminance 0.051; OKLCH L 38.9% C 0.178 H 283.7°. Best body text is #FFFFFF at 10.42:1 contrast (WCAG AA passes).

Color values

HEX#40289E
RGBrgb(64, 40, 158)
HSLhsl(252, 60%, 39%)
HSVhsv(252, 75%, 62%)
CMYKcmyk(59.5%, 74.7%, 0%, 38%)
CIE-LABlab(26.95, 43.13, -60.08)
CIE-LCHlch(26.95, 73.96, 305.67°)
OKLaboklab(38.93% 0.0423 -0.1731)
OKLCHoklch(38.93% 0.178 283.7)
XYZxyz(9.0428, 5.0756, 32.8443)
Luminance0.0508 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40289E #869E28
analogous
#284B9E #40289E #7B289E
triadic
#40289E #9E4028 #289E40
tetradic
#40289E #9E284B #869E28 #289E7B
square
#40289E #9E284B #869E28 #289E7B
split-complementary
#40289E #9E7B28 #4B9E28
monochromatic
#180F3C #2C1C6D #40289E #5537CC #7F68D9

Accessibility & contrast

On white

10.42
#40289E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.02
#40289E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40289E
10.42:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40289E#FFFFFF#000000##FFFFFF
##40289E1.0010.422.0210.42
#FFFFFF10.421.0021.001.00
#0000002.0221.001.0021.00
##FFFFFF10.421.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0043A1
Deuteranopia (green-blind)
#003C9C
Tritanopia (blue-blind)
#054961
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #40289e;
/* rgb */ color: rgb(64, 40, 158);
/* oklch */ color: oklch(38.9% 0.178 283.7);
Tailwind
colors: {
  custom: {
    50: '#8065bc',
    500: '#40289e',
    950: '#000000',
  },
}
SCSS
$custom: #40289e;
$custom-light: #8065bc;
$custom-dark: #000000;
JSON
{
  "hex": "#40289e",
  "rgb": {
    "r": 64,
    "g": 40,
    "b": 158
  },
  "hsl": {
    "h": 252.203,
    "s": 59.596,
    "l": 38.824
  },
  "oklch": {
    "l": 0.38926,
    "c": 0.17819,
    "h": 283.7
  },
  "luminance": 0.05076
}

Semantic roles & 50–950 ramp

primary
#40289E
secondary
#ACBF63
accent
#E345C3
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #40289E

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

Preview Lab → · Contrast checker → · Palette generator →

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