#40229C#40229C

#40229C is a dark, vivid violet. Relative luminance 0.046; OKLCH L 38.0% C 0.182 H 285.0°. Best body text is #FFFFFF at 10.90:1 contrast (WCAG AA passes).

Color values

HEX#40229C
RGBrgb(64, 34, 156)
HSLhsl(255, 64%, 37%)
HSVhsv(255, 78%, 61%)
CMYKcmyk(59%, 78.2%, 0%, 38.8%)
CIE-LABlab(25.66, 45.62, -60.97)
CIE-LCHlch(25.66, 76.15, 306.80°)
OKLaboklab(37.96% 0.0472 -0.1757)
OKLCHoklch(37.96% 0.182 285)
XYZxyz(8.6853, 4.6338, 31.8828)
Luminance0.0463 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40229C #7E9C22
analogous
#22419C #40229C #7D229C
triadic
#40229C #9C4022 #229C40
tetradic
#40229C #9C2241 #7E9C22 #229C7D
square
#40229C #9C2241 #7E9C22 #229C7D
split-complementary
#40229C #9C7D22 #419C22
monochromatic
#170C38 #2B176A #40229C #552DCE #7C5DDC

Accessibility & contrast

On white

10.90
#40229C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40229C
10.90:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40229C#FFFFFF#000000##FFFFFF
##40229C1.0010.901.9310.90
#FFFFFF10.901.0021.001.00
#0000001.9321.001.0021.00
##FFFFFF10.901.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00409F
Deuteranopia (green-blind)
#00399A
Tritanopia (blue-blind)
#0C455E
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #40229c;
/* rgb */ color: rgb(64, 34, 156);
/* oklch */ color: oklch(38.0% 0.182 285.0);
Tailwind
colors: {
  custom: {
    50: '#8061ba',
    500: '#40229c',
    950: '#000000',
  },
}
SCSS
$custom: #40229c;
$custom-light: #8061ba;
$custom-dark: #000000;
JSON
{
  "hex": "#40229c",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 156
  },
  "hsl": {
    "h": 254.754,
    "s": 64.211,
    "l": 37.255
  },
  "oklch": {
    "l": 0.37964,
    "c": 0.18188,
    "h": 285
  },
  "luminance": 0.04634
}

Semantic roles & 50–950 ramp

primary
#40229C
secondary
#A7C05A
accent
#E741BE
background
#F8F5FB
surface
#F0EAF6
border
#CBC6D0
text
#0B0512
muted
#7C7981

Preview Lab

Preview with #40229C

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

Preview Lab → · Contrast checker → · Palette generator →

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