#40229F#40229F

#40229F is a dark, vivid violet. Relative luminance 0.047; OKLCH L 38.3% C 0.185 H 284.5°. Best body text is #FFFFFF at 10.78:1 contrast (WCAG AA passes).

Color values

HEX#40229F
RGBrgb(64, 34, 159)
HSLhsl(254, 65%, 38%)
HSVhsv(254, 79%, 62%)
CMYKcmyk(59.7%, 78.6%, 0%, 37.6%)
CIE-LABlab(25.97, 46.50, -62.30)
CIE-LCHlch(25.97, 77.74, 306.74°)
OKLaboklab(38.27% 0.0463 -0.1795)
OKLCHoklch(38.27% 0.185 284.5)
XYZxyz(8.9425, 4.7367, 33.2372)
Luminance0.0474 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40229F #819F22
analogous
#22429F #40229F #7E229F
triadic
#40229F #9F4022 #229F40
tetradic
#40229F #9F2242 #819F22 #229F7E
square
#40229F #9F2242 #819F22 #229F7E
split-complementary
#40229F #9F7E22 #429F22
monochromatic
#170C3A #2C176D #40229F #542DD1 #7D5FDD

Accessibility & contrast

On white

10.78
#40229F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.95
#40229F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40229F
10.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40229F#FFFFFF#000000##FFFFFF
##40229F1.0010.781.9510.78
#FFFFFF10.781.0021.001.00
#0000001.9521.001.0021.00
##FFFFFF10.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0041A2
Deuteranopia (green-blind)
#00399D
Tritanopia (blue-blind)
#044660
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #40229f;
/* rgb */ color: rgb(64, 34, 159);
/* oklch */ color: oklch(38.3% 0.185 284.5);
Tailwind
colors: {
  custom: {
    50: '#8161bd',
    500: '#40229f',
    950: '#000000',
  },
}
SCSS
$custom: #40229f;
$custom-light: #8161bd;
$custom-dark: #000000;
JSON
{
  "hex": "#40229f",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 159
  },
  "hsl": {
    "h": 254.4,
    "s": 64.767,
    "l": 37.843
  },
  "oklch": {
    "l": 0.38269,
    "c": 0.18541,
    "h": 284.5
  },
  "luminance": 0.04737
}

Semantic roles & 50–950 ramp

primary
#40229F
secondary
#A9C15B
accent
#E840C0
background
#F8F5FB
surface
#F0EAF7
border
#CBC6D0
text
#0B0512
muted
#7C7981

Preview Lab

Preview with #40229F

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

Preview Lab → · Contrast checker → · Palette generator →

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