#40228D#40228D

#40228D is a dark, vivid violet. Relative luminance 0.042; OKLCH L 36.5% C 0.164 H 288.2°. Best body text is #FFFFFF at 11.47:1 contrast (WCAG AA passes).

Color values

HEX#40228D
RGBrgb(64, 34, 141)
HSLhsl(257, 61%, 34%)
HSVhsv(257, 76%, 55%)
CMYKcmyk(54.6%, 75.9%, 0%, 44.7%)
CIE-LABlab(24.18, 41.19, -54.16)
CIE-LCHlch(24.18, 68.04, 307.25°)
OKLaboklab(36.48% 0.0513 -0.1557)
OKLCHoklch(36.48% 0.164 288.2)
XYZxyz(7.4927, 4.1568, 25.6017)
Luminance0.0416 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40228D #6F8D22
analogous
#223A8D #40228D #76228D
triadic
#40228D #8D4022 #228D40
tetradic
#40228D #8D223A #6F8D22 #228D76
square
#40228D #8D223A #6F8D22 #228D76
split-complementary
#40228D #8D7622 #3A8D22
monochromatic
#130A2A #2A165C #40228D #562EBE #7854D6

Accessibility & contrast

On white

11.47
#40228D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.83
#40228D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40228D
11.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40228D#FFFFFF#000000##FFFFFF
##40228D1.0011.471.8311.47
#FFFFFF11.471.0021.001.00
#0000001.8321.001.0021.00
##FFFFFF11.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C90
Deuteranopia (green-blind)
#00378B
Tritanopia (blue-blind)
#213F56
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #40228d;
/* rgb */ color: rgb(64, 34, 141);
/* oklch */ color: oklch(36.5% 0.164 288.2);
Tailwind
colors: {
  custom: {
    50: '#7e60af',
    500: '#40228d',
    950: '#000000',
  },
}
SCSS
$custom: #40228d;
$custom-light: #7e60af;
$custom-dark: #000000;
JSON
{
  "hex": "#40228d",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 141
  },
  "hsl": {
    "h": 256.822,
    "s": 61.143,
    "l": 34.314
  },
  "oklch": {
    "l": 0.36475,
    "c": 0.16396,
    "h": 288.2
  },
  "luminance": 0.04157
}

Semantic roles & 50–950 ramp

primary
#40228D
secondary
#9CB951
accent
#E444B7
background
#F8F5FA
surface
#EFEAF5
border
#CAC6CF
text
#0B0510
muted
#7C797F

Preview Lab

Preview with #40228D

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

Preview Lab → · Contrast checker → · Palette generator →

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