#40278D#40278D

#40278D is a dark, vivid violet. Relative luminance 0.045; OKLCH L 37.2% C 0.158 H 287.2°. Best body text is #FFFFFF at 11.09:1 contrast (WCAG AA passes).

Color values

HEX#40278D
RGBrgb(64, 39, 141)
HSLhsl(255, 57%, 35%)
HSVhsv(255, 72%, 55%)
CMYKcmyk(54.6%, 72.3%, 0%, 44.7%)
CIE-LABlab(25.15, 38.48, -52.58)
CIE-LCHlch(25.15, 65.15, 306.20°)
OKLaboklab(37.16% 0.0469 -0.1511)
OKLCHoklch(37.16% 0.158 287.2)
XYZxyz(7.6462, 4.4637, 25.6528)
Luminance0.0446 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40278D #748D27
analogous
#27418D #40278D #73278D
triadic
#40278D #8D4027 #278D40
tetradic
#40278D #8D2741 #748D27 #278D73
square
#40278D #8D2741 #748D27 #278D73
split-complementary
#40278D #8D7327 #418D27
monochromatic
#140C2D #2A1A5D #40278D #5634BD #795CD2

Accessibility & contrast

On white

11.09
#40278D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.89
#40278D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40278D
11.09:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40278D#FFFFFF#000000##FFFFFF
##40278D1.0011.091.8911.09
#FFFFFF11.091.0021.001.00
#0000001.8921.001.0021.00
##FFFFFF11.091.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E90
Deuteranopia (green-blind)
#00398B
Tritanopia (blue-blind)
#214257
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #40278d;
/* rgb */ color: rgb(64, 39, 141);
/* oklch */ color: oklch(37.2% 0.158 287.2);
Tailwind
colors: {
  custom: {
    50: '#7d63af',
    500: '#40278d',
    950: '#000000',
  },
}
SCSS
$custom: #40278d;
$custom-light: #7d63af;
$custom-dark: #000000;
JSON
{
  "hex": "#40278d",
  "rgb": {
    "r": 64,
    "g": 39,
    "b": 141
  },
  "hsl": {
    "h": 254.706,
    "s": 56.667,
    "l": 35.294
  },
  "oklch": {
    "l": 0.37159,
    "c": 0.15823,
    "h": 287.2
  },
  "luminance": 0.04464
}

Semantic roles & 50–950 ramp

primary
#40278D
secondary
#A0B759
accent
#E048BB
background
#F8F6FA
surface
#EFEBF5
border
#CAC6CF
text
#0B0510
muted
#7C7A7F

Preview Lab

Preview with #40278D

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

Preview Lab → · Contrast checker → · Palette generator →

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