#40229D#40229D

#40229D is a dark, vivid violet. Relative luminance 0.047; OKLCH L 38.1% C 0.183 H 284.8°. Best body text is #FFFFFF at 10.86:1 contrast (WCAG AA passes).

Color values

HEX#40229D
RGBrgb(64, 34, 157)
HSLhsl(255, 64%, 37%)
HSVhsv(255, 78%, 62%)
CMYKcmyk(59.2%, 78.3%, 0%, 38.4%)
CIE-LABlab(25.77, 45.91, -61.42)
CIE-LCHlch(25.77, 76.68, 306.78°)
OKLaboklab(38.07% 0.0469 -0.177)
OKLCHoklch(38.07% 0.183 284.8)
XYZxyz(8.7703, 4.6678, 32.3306)
Luminance0.0467 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40229D #7F9D22
analogous
#22429D #40229D #7D229D
triadic
#40229D #9D4022 #229D40
tetradic
#40229D #9D2242 #7F9D22 #229D7D
square
#40229D #9D2242 #7F9D22 #229D7D
split-complementary
#40229D #9D7D22 #429D22
monochromatic
#170C38 #2B176B #40229D #552DCF #7C5DDC

Accessibility & contrast

On white

10.86
#40229D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.93
#40229D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40229D
10.86:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40229D#FFFFFF#000000##FFFFFF
##40229D1.0010.861.9310.86
#FFFFFF10.861.0021.001.00
#0000001.9321.001.0021.00
##FFFFFF10.861.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0040A0
Deuteranopia (green-blind)
#00399B
Tritanopia (blue-blind)
#09465F
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #40229d;
/* rgb */ color: rgb(64, 34, 157);
/* oklch */ color: oklch(38.1% 0.183 284.8);
Tailwind
colors: {
  custom: {
    50: '#8061bb',
    500: '#40229d',
    950: '#000000',
  },
}
SCSS
$custom: #40229d;
$custom-light: #8061bb;
$custom-dark: #000000;
JSON
{
  "hex": "#40229d",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 157
  },
  "hsl": {
    "h": 254.634,
    "s": 64.398,
    "l": 37.451
  },
  "oklch": {
    "l": 0.38065,
    "c": 0.18306,
    "h": 284.8
  },
  "luminance": 0.04668
}

Semantic roles & 50–950 ramp

primary
#40229D
secondary
#A8C15A
accent
#E740BF
background
#F8F5FB
surface
#F0EAF6
border
#CBC6D0
text
#0B0512
muted
#7C7981

Preview Lab

Preview with #40229D

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

Preview Lab → · Contrast checker → · Palette generator →

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