#40228A#40228A

#40228A is a dark, vivid violet. Relative luminance 0.041; OKLCH L 36.2% C 0.160 H 288.9°. Best body text is #FFFFFF at 11.58:1 contrast (WCAG AA passes).

Color values

HEX#40228A
RGBrgb(64, 34, 138)
HSLhsl(257, 60%, 34%)
HSVhsv(257, 75%, 54%)
CMYKcmyk(53.6%, 75.4%, 0%, 45.9%)
CIE-LABlab(23.90, 40.30, -52.76)
CIE-LCHlch(23.90, 66.39, 307.37°)
OKLaboklab(36.19% 0.052 -0.1516)
OKLCHoklch(36.19% 0.16 288.9)
XYZxyz(7.2725, 4.0687, 24.4420)
Luminance0.0407 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40228A #6C8A22
analogous
#22388A #40228A #74228A
triadic
#40228A #8A4022 #228A40
tetradic
#40228A #8A2238 #6C8A22 #228A74
square
#40228A #8A2238 #6C8A22 #228A74
split-complementary
#40228A #8A7422 #388A22
monochromatic
#120A28 #291659 #40228A #572EBB #7852D4

Accessibility & contrast

On white

11.58
#40228A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.81
#40228A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40228A
11.58:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40228A#FFFFFF#000000##FFFFFF
##40228A1.0011.581.8111.58
#FFFFFF11.581.0021.001.00
#0000001.8121.001.0021.00
##FFFFFF11.581.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B8D
Deuteranopia (green-blind)
#003688
Tritanopia (blue-blind)
#243E54
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #40228a;
/* rgb */ color: rgb(64, 34, 138);
/* oklch */ color: oklch(36.2% 0.160 288.9);
Tailwind
colors: {
  custom: {
    50: '#7d60ad',
    500: '#40228a',
    950: '#000000',
  },
}
SCSS
$custom: #40228a;
$custom-light: #7d60ad;
$custom-dark: #000000;
JSON
{
  "hex": "#40228a",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 138
  },
  "hsl": {
    "h": 257.308,
    "s": 60.465,
    "l": 33.725
  },
  "oklch": {
    "l": 0.36186,
    "c": 0.16031,
    "h": 288.9
  },
  "luminance": 0.04069
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #40228A

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

Preview Lab → · Contrast checker → · Palette generator →

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