#40228F#40228F

#40228F is a dark, vivid violet. Relative luminance 0.042; OKLCH L 36.7% C 0.166 H 287.8°. Best body text is #FFFFFF at 11.39:1 contrast (WCAG AA passes).

Color values

HEX#40228F
RGBrgb(64, 34, 143)
HSLhsl(257, 62%, 35%)
HSVhsv(257, 76%, 56%)
CMYKcmyk(55.2%, 76.2%, 0%, 43.9%)
CIE-LABlab(24.38, 41.78, -55.09)
CIE-LCHlch(24.38, 69.14, 307.18°)
OKLaboklab(36.67% 0.0508 -0.1584)
OKLCHoklch(36.67% 0.166 287.8)
XYZxyz(7.6428, 4.2168, 26.3925)
Luminance0.0422 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40228F #718F22
analogous
#223A8F #40228F #77228F
triadic
#40228F #8F4022 #228F40
tetradic
#40228F #8F223A #718F22 #228F77
square
#40228F #8F223A #718F22 #228F77
split-complementary
#40228F #8F7722 #3A8F22
monochromatic
#140A2C #2A165E #40228F #562EC0 #7955D7

Accessibility & contrast

On white

11.39
#40228F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40228F
11.39:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40228F#FFFFFF#000000##FFFFFF
##40228F1.0011.391.8411.39
#FFFFFF11.391.0021.001.00
#0000001.8421.001.0021.00
##FFFFFF11.391.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C92
Deuteranopia (green-blind)
#00378D
Tritanopia (blue-blind)
#1F4057
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #40228f;
/* rgb */ color: rgb(64, 34, 143);
/* oklch */ color: oklch(36.7% 0.166 287.8);
Tailwind
colors: {
  custom: {
    50: '#7e61b1',
    500: '#40228f',
    950: '#000000',
  },
}
SCSS
$custom: #40228f;
$custom-light: #7e61b1;
$custom-dark: #000000;
JSON
{
  "hex": "#40228f",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 143
  },
  "hsl": {
    "h": 256.514,
    "s": 61.582,
    "l": 34.706
  },
  "oklch": {
    "l": 0.36669,
    "c": 0.16638,
    "h": 287.8
  },
  "luminance": 0.04217
}

Semantic roles & 50–950 ramp

primary
#40228F
secondary
#9EBA52
accent
#E543B8
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #40228F

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

Preview Lab → · Contrast checker → · Palette generator →

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