#40237A#40237A

#40237A is a dark, vivid violet. Relative luminance 0.037; OKLCH L 34.8% C 0.139 H 293.1°. Best body text is #FFFFFF at 12.07:1 contrast (WCAG AA passes).

Color values

HEX#40237A
RGBrgb(64, 35, 122)
HSLhsl(260, 55%, 31%)
HSVhsv(260, 71%, 48%)
CMYKcmyk(47.5%, 71.3%, 0%, 52.2%)
CIE-LABlab(22.64, 35.00, -44.73)
CIE-LCHlch(22.64, 56.80, 308.04°)
OKLaboklab(34.85% 0.0545 -0.1281)
OKLCHoklch(34.85% 0.139 293.1)
XYZxyz(6.2273, 3.6970, 18.7941)
Luminance0.0370 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40237A #5D7A23
analogous
#23317A #40237A #6B237A
triadic
#40237A #7A4023 #237A40
tetradic
#40237A #7A2331 #5D7A23 #237A6B
square
#40237A #7A2331 #5D7A23 #237A6B
split-complementary
#40237A #7A6B23 #317A23
monochromatic
#0E081B #27154A #40237A #5931AA #764CCC

Accessibility & contrast

On white

12.07
#40237A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.74
#40237A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40237A
12.07:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40237A#FFFFFF#000000##FFFFFF
##40237A1.0012.071.7412.07
#FFFFFF12.071.0021.001.00
#0000001.7421.001.0021.00
##FFFFFF12.071.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00377D
Deuteranopia (green-blind)
#003478
Tritanopia (blue-blind)
#2F394B
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #40237a;
/* rgb */ color: rgb(64, 35, 122);
/* oklch */ color: oklch(34.8% 0.139 293.1);
Tailwind
colors: {
  custom: {
    50: '#7b60a1',
    500: '#40237a',
    950: '#000000',
  },
}
SCSS
$custom: #40237a;
$custom-light: #7b60a1;
$custom-dark: #000000;
JSON
{
  "hex": "#40237a",
  "rgb": {
    "r": 64,
    "g": 35,
    "b": 122
  },
  "hsl": {
    "h": 260,
    "s": 55.414,
    "l": 30.784
  },
  "oklch": {
    "l": 0.34848,
    "c": 0.1392,
    "h": 293.1
  },
  "luminance": 0.03697
}

Semantic roles & 50–950 ramp

primary
#40237A
secondary
#8CAD4C
accent
#DF49AD
background
#F7F5FA
surface
#EEEAF3
border
#C9C6CD
text
#0A050F
muted
#7C797F

Preview Lab

Preview with #40237A

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

Preview Lab → · Contrast checker → · Palette generator →

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