#40278B#40278B

#40278B is a dark, vivid violet. Relative luminance 0.044; OKLCH L 37.0% C 0.156 H 287.7°. Best body text is #FFFFFF at 11.16:1 contrast (WCAG AA passes).

Color values

HEX#40278B
RGBrgb(64, 39, 139)
HSLhsl(255, 56%, 35%)
HSVhsv(255, 72%, 55%)
CMYKcmyk(54%, 71.9%, 0%, 45.5%)
CIE-LABlab(24.97, 37.87, -51.63)
CIE-LCHlch(24.97, 64.03, 306.26°)
OKLaboklab(36.97% 0.0473 -0.1483)
OKLCHoklch(36.97% 0.156 287.7)
XYZxyz(7.4987, 4.4047, 24.8762)
Luminance0.0440 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40278B #728B27
analogous
#27408B #40278B #72278B
triadic
#40278B #8B4027 #278B40
tetradic
#40278B #8B2740 #728B27 #278B72
square
#40278B #8B2740 #728B27 #278B72
split-complementary
#40278B #8B7227 #408B27
monochromatic
#140C2B #2A1A5B #40278B #5634BB #795BD1

Accessibility & contrast

On white

11.16
#40278B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.88
#40278B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40278B
11.16:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40278B#FFFFFF#000000##FFFFFF
##40278B1.0011.161.8811.16
#FFFFFF11.161.0021.001.00
#0000001.8821.001.0021.00
##FFFFFF11.161.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E8E
Deuteranopia (green-blind)
#003989
Tritanopia (blue-blind)
#234156
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #40278b;
/* rgb */ color: rgb(64, 39, 139);
/* oklch */ color: oklch(37.0% 0.156 287.7);
Tailwind
colors: {
  custom: {
    50: '#7d63ae',
    500: '#40278b',
    950: '#000000',
  },
}
SCSS
$custom: #40278b;
$custom-light: #7d63ae;
$custom-dark: #000000;
JSON
{
  "hex": "#40278b",
  "rgb": {
    "r": 64,
    "g": 39,
    "b": 139
  },
  "hsl": {
    "h": 255,
    "s": 56.18,
    "l": 34.902
  },
  "oklch": {
    "l": 0.36973,
    "c": 0.15571,
    "h": 287.7
  },
  "luminance": 0.04405
}

Semantic roles & 50–950 ramp

primary
#40278B
secondary
#9FB658
accent
#DF48BA
background
#F8F6FA
surface
#EFEBF4
border
#CAC6CE
text
#0A0510
muted
#7C7A7F

Preview Lab

Preview with #40278B

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

Preview Lab → · Contrast checker → · Palette generator →

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