#40288B#40288B

#40288B is a dark, vivid violet. Relative luminance 0.045; OKLCH L 37.1% C 0.154 H 287.5°. Best body text is #FFFFFF at 11.09:1 contrast (WCAG AA passes).

Color values

HEX#40288B
RGBrgb(64, 40, 139)
HSLhsl(255, 55%, 35%)
HSVhsv(255, 71%, 55%)
CMYKcmyk(54%, 71.2%, 0%, 45.5%)
CIE-LABlab(25.17, 37.30, -51.30)
CIE-LCHlch(25.17, 63.42, 306.02°)
OKLaboklab(37.12% 0.0464 -0.1474)
OKLCHoklch(37.12% 0.155 287.5)
XYZxyz(7.5320, 4.4713, 24.8873)
Luminance0.0447 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40288B #738B28
analogous
#28428B #40288B #71288B
triadic
#40288B #8B4028 #288B40
tetradic
#40288B #8B2842 #738B28 #288B71
square
#40288B #8B2842 #738B28 #288B71
split-complementary
#40288B #8B7128 #428B28
monochromatic
#140D2C #2A1A5B #40288B #5636BB #795DD0

Accessibility & contrast

On white

11.09
#40288B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.89
#40288B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40288B
11.09:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40288B#FFFFFF#000000##FFFFFF
##40288B1.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)
#003E8E
Deuteranopia (green-blind)
#003989
Tritanopia (blue-blind)
#234256
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #40288b;
/* rgb */ color: rgb(64, 40, 139);
/* oklch */ color: oklch(37.1% 0.154 287.5);
Tailwind
colors: {
  custom: {
    50: '#7d64ae',
    500: '#40288b',
    950: '#000000',
  },
}
SCSS
$custom: #40288b;
$custom-light: #7d64ae;
$custom-dark: #000000;
JSON
{
  "hex": "#40288b",
  "rgb": {
    "r": 64,
    "g": 40,
    "b": 139
  },
  "hsl": {
    "h": 254.545,
    "s": 55.307,
    "l": 35.098
  },
  "oklch": {
    "l": 0.3712,
    "c": 0.1545,
    "h": 287.5
  },
  "luminance": 0.04472
}

Semantic roles & 50–950 ramp

primary
#40288B
secondary
#9FB659
accent
#DF49BA
background
#F8F6FA
surface
#EFEBF4
border
#CAC6CE
text
#0A0510
muted
#7C7A7F

Preview Lab

Preview with #40288B

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

Preview Lab → · Contrast checker → · Palette generator →

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