#40228E#40228E

#40228E is a dark, vivid violet. Relative luminance 0.042; OKLCH L 36.6% C 0.165 H 288.0°. Best body text is #FFFFFF at 11.43:1 contrast (WCAG AA passes).

Color values

HEX#40228E
RGBrgb(64, 34, 142)
HSLhsl(257, 61%, 35%)
HSVhsv(257, 76%, 56%)
CMYKcmyk(54.9%, 76.1%, 0%, 44.3%)
CIE-LABlab(24.28, 41.48, -54.63)
CIE-LCHlch(24.28, 68.59, 307.21°)
OKLaboklab(36.57% 0.051 -0.1571)
OKLCHoklch(36.57% 0.165 288)
XYZxyz(7.5674, 4.1867, 25.9953)
Luminance0.0419 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40228E #708E22
analogous
#223A8E #40228E #76228E
triadic
#40228E #8E4022 #228E40
tetradic
#40228E #8E223A #708E22 #228E76
square
#40228E #8E223A #708E22 #228E76
split-complementary
#40228E #8E7622 #3A8E22
monochromatic
#130A2B #2A165D #40228E #562EBF #7854D6

Accessibility & contrast

On white

11.43
#40228E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.84
#40228E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40228E
11.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40228E#FFFFFF#000000##FFFFFF
##40228E1.0011.431.8411.43
#FFFFFF11.431.0021.001.00
#0000001.8421.001.0021.00
##FFFFFF11.431.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C91
Deuteranopia (green-blind)
#00378C
Tritanopia (blue-blind)
#204056
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #40228e;
/* rgb */ color: rgb(64, 34, 142);
/* oklch */ color: oklch(36.6% 0.165 288.0);
Tailwind
colors: {
  custom: {
    50: '#7e60b0',
    500: '#40228e',
    950: '#000000',
  },
}
SCSS
$custom: #40228e;
$custom-light: #7e60b0;
$custom-dark: #000000;
JSON
{
  "hex": "#40228e",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 142
  },
  "hsl": {
    "h": 256.667,
    "s": 61.364,
    "l": 34.51
  },
  "oklch": {
    "l": 0.36572,
    "c": 0.16517,
    "h": 288
  },
  "luminance": 0.04187
}

Semantic roles & 50–950 ramp

primary
#40228E
secondary
#9DBA52
accent
#E443B8
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #40228E

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

Preview Lab → · Contrast checker → · Palette generator →

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