#40229A#40229A

#40229A is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.8% C 0.180 H 285.4°. Best body text is #FFFFFF at 10.98:1 contrast (WCAG AA passes).

Color values

HEX#40229A
RGBrgb(64, 34, 154)
HSLhsl(255, 64%, 37%)
HSVhsv(255, 78%, 60%)
CMYKcmyk(58.4%, 77.9%, 0%, 39.6%)
CIE-LABlab(25.46, 45.03, -60.08)
CIE-LCHlch(25.46, 75.08, 306.85°)
OKLaboklab(37.76% 0.0477 -0.1731)
OKLCHoklch(37.76% 0.18 285.4)
XYZxyz(8.5173, 4.5666, 30.9982)
Luminance0.0457 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40229A #7C9A22
analogous
#22409A #40229A #7C229A
triadic
#40229A #9A4022 #229A40
tetradic
#40229A #9A2240 #7C9A22 #229A7C
square
#40229A #9A2240 #7C9A22 #229A7C
split-complementary
#40229A #9A7C22 #409A22
monochromatic
#160C36 #2B1768 #40229A #552DCC #7B5BDB

Accessibility & contrast

On white

10.98
#40229A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.91
#40229A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40229A
10.98:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40229A#FFFFFF#000000##FFFFFF
##40229A1.0010.981.9110.98
#FFFFFF10.981.0021.001.00
#0000001.9121.001.0021.00
##FFFFFF10.981.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00409D
Deuteranopia (green-blind)
#003998
Tritanopia (blue-blind)
#10445D
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #40229a;
/* rgb */ color: rgb(64, 34, 154);
/* oklch */ color: oklch(37.8% 0.180 285.4);
Tailwind
colors: {
  custom: {
    50: '#8061b9',
    500: '#40229a',
    950: '#000000',
  },
}
SCSS
$custom: #40229a;
$custom-light: #8061b9;
$custom-dark: #000000;
JSON
{
  "hex": "#40229a",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 154
  },
  "hsl": {
    "h": 255,
    "s": 63.83,
    "l": 36.863
  },
  "oklch": {
    "l": 0.37761,
    "c": 0.17952,
    "h": 285.4
  },
  "luminance": 0.04567
}

Semantic roles & 50–950 ramp

primary
#40229A
secondary
#A6BF58
accent
#E741BD
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0512
muted
#7C7981

Preview Lab

Preview with #40229A

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

Preview Lab → · Contrast checker → · Palette generator →

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