#40228B#40228B

#40228B is a dark, vivid violet. Relative luminance 0.041; OKLCH L 36.3% C 0.162 H 288.7°. Best body text is #FFFFFF at 11.54:1 contrast (WCAG AA passes).

Color values

HEX#40228B
RGBrgb(64, 34, 139)
HSLhsl(257, 61%, 34%)
HSVhsv(257, 76%, 55%)
CMYKcmyk(54%, 75.5%, 0%, 45.5%)
CIE-LABlab(23.99, 40.59, -53.23)
CIE-LCHlch(23.99, 66.94, 307.33°)
OKLaboklab(36.28% 0.0518 -0.153)
OKLCHoklch(36.28% 0.162 288.7)
XYZxyz(7.3452, 4.0978, 24.8250)
Luminance0.0410 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40228B #6D8B22
analogous
#22398B #40228B #75228B
triadic
#40228B #8B4022 #228B40
tetradic
#40228B #8B2239 #6D8B22 #228B75
square
#40228B #8B2239 #6D8B22 #228B75
split-complementary
#40228B #8B7522 #398B22
monochromatic
#130A29 #29165A #40228B #572EBC #7853D5

Accessibility & contrast

On white

11.54
#40228B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.82
#40228B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40228B
11.54:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40228B#FFFFFF#000000##FFFFFF
##40228B1.0011.541.8211.54
#FFFFFF11.541.0021.001.00
#0000001.8221.001.0021.00
##FFFFFF11.541.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B8E
Deuteranopia (green-blind)
#003689
Tritanopia (blue-blind)
#233F55
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #40228b;
/* rgb */ color: rgb(64, 34, 139);
/* oklch */ color: oklch(36.3% 0.162 288.7);
Tailwind
colors: {
  custom: {
    50: '#7d60ae',
    500: '#40228b',
    950: '#000000',
  },
}
SCSS
$custom: #40228b;
$custom-light: #7d60ae;
$custom-dark: #000000;
JSON
{
  "hex": "#40228b",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 139
  },
  "hsl": {
    "h": 257.143,
    "s": 60.694,
    "l": 33.922
  },
  "oklch": {
    "l": 0.36282,
    "c": 0.16153,
    "h": 288.7
  },
  "luminance": 0.04098
}

Semantic roles & 50–950 ramp

primary
#40228B
secondary
#9BB850
accent
#E444B6
background
#F8F5FA
surface
#EFEAF4
border
#CAC6CE
text
#0B0510
muted
#7C797F

Preview Lab

Preview with #40228B

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

Preview Lab → · Contrast checker → · Palette generator →

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