#40239A#40239A

#40239A is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.9% C 0.179 H 285.3°. Best body text is #FFFFFF at 10.91:1 contrast (WCAG AA passes).

Color values

HEX#40239A
RGBrgb(64, 35, 154)
HSLhsl(255, 63%, 37%)
HSVhsv(255, 77%, 60%)
CMYKcmyk(58.4%, 77.3%, 0%, 39.6%)
CIE-LABlab(25.64, 44.53, -59.79)
CIE-LCHlch(25.64, 74.55, 306.68°)
OKLaboklab(37.88% 0.047 -0.1722)
OKLCHoklch(37.88% 0.179 285.3)
XYZxyz(8.5463, 4.6246, 31.0079)
Luminance0.0462 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40239A #7D9A23
analogous
#23419A #40239A #7C239A
triadic
#40239A #9A4023 #239A40
tetradic
#40239A #9A2341 #7D9A23 #239A7C
square
#40239A #9A2341 #7D9A23 #239A7C
split-complementary
#40239A #9A7C23 #419A23
monochromatic
#170C36 #2B1868 #40239A #552ECC #7C5DDA

Accessibility & contrast

On white

10.91
#40239A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.93
#40239A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40239A
10.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40239A#FFFFFF#000000##FFFFFF
##40239A1.0010.911.9310.91
#FFFFFF10.911.0021.001.00
#0000001.9321.001.0021.00
##FFFFFF10.911.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #40239a;
/* rgb */ color: rgb(64, 35, 154);
/* oklch */ color: oklch(37.9% 0.179 285.3);
Tailwind
colors: {
  custom: {
    50: '#8062b9',
    500: '#40239a',
    950: '#000000',
  },
}
SCSS
$custom: #40239a;
$custom-light: #8062b9;
$custom-dark: #000000;
JSON
{
  "hex": "#40239a",
  "rgb": {
    "r": 64,
    "g": 35,
    "b": 154
  },
  "hsl": {
    "h": 254.622,
    "s": 62.963,
    "l": 37.059
  },
  "oklch": {
    "l": 0.37884,
    "c": 0.17852,
    "h": 285.3
  },
  "luminance": 0.04625
}

Semantic roles & 50–950 ramp

primary
#40239A
secondary
#A6BF5A
accent
#E642BE
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0512
muted
#7C7981

Preview Lab

Preview with #40239A

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

Preview Lab → · Contrast checker → · Palette generator →

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