#40278F#40278F

#40278F is a dark, vivid violet. Relative luminance 0.045; OKLCH L 37.3% C 0.161 H 286.8°. Best body text is #FFFFFF at 11.02:1 contrast (WCAG AA passes).

Color values

HEX#40278F
RGBrgb(64, 39, 143)
HSLhsl(254, 57%, 36%)
HSVhsv(254, 73%, 56%)
CMYKcmyk(55.2%, 72.7%, 0%, 43.9%)
CIE-LABlab(25.33, 39.09, -53.52)
CIE-LCHlch(25.33, 66.27, 306.14°)
OKLaboklab(37.35% 0.0465 -0.1539)
OKLCHoklch(37.35% 0.161 286.8)
XYZxyz(7.7963, 4.5238, 26.4436)
Luminance0.0452 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40278F #768F27
analogous
#27428F #40278F #74278F
triadic
#40278F #8F4027 #278F40
tetradic
#40278F #8F2742 #768F27 #278F74
square
#40278F #8F2742 #768F27 #278F74
split-complementary
#40278F #8F7427 #428F27
monochromatic
#150D2F #2A1A5F #40278F #5634BF #7A5DD3

Accessibility & contrast

On white

11.02
#40278F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.90
#40278F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40278F
11.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40278F#FFFFFF#000000##FFFFFF
##40278F1.0011.021.9011.02
#FFFFFF11.021.0021.001.00
#0000001.9021.001.0021.00
##FFFFFF11.021.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F92
Deuteranopia (green-blind)
#00398D
Tritanopia (blue-blind)
#1F4358
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #40278f;
/* rgb */ color: rgb(64, 39, 143);
/* oklch */ color: oklch(37.3% 0.161 286.8);
Tailwind
colors: {
  custom: {
    50: '#7e63b1',
    500: '#40278f',
    950: '#000000',
  },
}
SCSS
$custom: #40278f;
$custom-light: #7e63b1;
$custom-dark: #000000;
JSON
{
  "hex": "#40278f",
  "rgb": {
    "r": 64,
    "g": 39,
    "b": 143
  },
  "hsl": {
    "h": 254.423,
    "s": 57.143,
    "l": 35.686
  },
  "oklch": {
    "l": 0.37346,
    "c": 0.16075,
    "h": 286.8
  },
  "luminance": 0.04524
}

Semantic roles & 50–950 ramp

primary
#40278F
secondary
#A1B85A
accent
#E047BC
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0511
muted
#7C7A80

Preview Lab

Preview with #40278F

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

Preview Lab → · Contrast checker → · Palette generator →

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