#40288C#40288C

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

Color values

HEX#40288C
RGBrgb(64, 40, 140)
HSLhsl(254, 56%, 35%)
HSVhsv(254, 71%, 55%)
CMYKcmyk(54.3%, 71.4%, 0%, 45.1%)
CIE-LABlab(25.26, 37.61, -51.77)
CIE-LCHlch(25.26, 63.99, 305.99°)
OKLaboklab(37.21% 0.0462 -0.1488)
OKLCHoklch(37.21% 0.156 287.2)
XYZxyz(7.6054, 4.5006, 25.2738)
Luminance0.0450 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40288C #748C28
analogous
#28428C #40288C #72288C
triadic
#40288C #8C4028 #288C40
tetradic
#40288C #8C2842 #748C28 #288C72
square
#40288C #8C2842 #748C28 #288C72
split-complementary
#40288C #8C7228 #428C28
monochromatic
#140D2D #2A1A5C #40288C #5636BC #795ED1

Accessibility & contrast

On white

11.05
#40288C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.90
#40288C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40288C
11.05:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40288C#FFFFFF#000000##FFFFFF
##40288C1.0011.051.9011.05
#FFFFFF11.051.0021.001.00
#0000001.9021.001.0021.00
##FFFFFF11.051.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E8F
Deuteranopia (green-blind)
#00398A
Tritanopia (blue-blind)
#224257
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #40288c;
/* rgb */ color: rgb(64, 40, 140);
/* oklch */ color: oklch(37.2% 0.156 287.2);
Tailwind
colors: {
  custom: {
    50: '#7d64ae',
    500: '#40288c',
    950: '#000000',
  },
}
SCSS
$custom: #40288c;
$custom-light: #7d64ae;
$custom-dark: #000000;
JSON
{
  "hex": "#40288c",
  "rgb": {
    "r": 64,
    "g": 40,
    "b": 140
  },
  "hsl": {
    "h": 254.4,
    "s": 55.556,
    "l": 35.294
  },
  "oklch": {
    "l": 0.37212,
    "c": 0.15577,
    "h": 287.2
  },
  "luminance": 0.04501
}

Semantic roles & 50–950 ramp

primary
#40288C
secondary
#A0B65A
accent
#DF49BB
background
#F8F6FA
surface
#EFEBF5
border
#CAC6CF
text
#0A0510
muted
#7C7A7F

Preview Lab

Preview with #40288C

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

Preview Lab → · Contrast checker → · Palette generator →

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