#40237F#40237F

#40237F is a dark, vivid violet. Relative luminance 0.038; OKLCH L 35.3% C 0.146 H 291.6°. Best body text is #FFFFFF at 11.90:1 contrast (WCAG AA passes).

Color values

HEX#40237F
RGBrgb(64, 35, 127)
HSLhsl(259, 57%, 32%)
HSVhsv(259, 72%, 50%)
CMYKcmyk(49.6%, 72.4%, 0%, 50.2%)
CIE-LABlab(23.08, 36.49, -47.19)
CIE-LCHlch(23.08, 59.65, 307.71°)
OKLaboklab(35.3% 0.0536 -0.1353)
OKLCHoklch(35.3% 0.146 291.6)
XYZxyz(6.5451, 3.8241, 20.4678)
Luminance0.0382 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40237F #627F23
analogous
#23347F #40237F #6E237F
triadic
#40237F #7F4023 #237F40
tetradic
#40237F #7F2334 #627F23 #237F6E
square
#40237F #7F2334 #627F23 #237F6E
split-complementary
#40237F #7F6E23 #347F23
monochromatic
#10091F #28164F #40237F #5830AF #774ECE

Accessibility & contrast

On white

11.90
#40237F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.76
#40237F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40237F
11.90:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40237F#FFFFFF#000000##FFFFFF
##40237F1.0011.901.7611.90
#FFFFFF11.901.0021.001.00
#0000001.7621.001.0021.00
##FFFFFF11.901.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003882
Deuteranopia (green-blind)
#00357D
Tritanopia (blue-blind)
#2C3A4E
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #40237f;
/* rgb */ color: rgb(64, 35, 127);
/* oklch */ color: oklch(35.3% 0.146 291.6);
Tailwind
colors: {
  custom: {
    50: '#7b60a5',
    500: '#40237f',
    950: '#000000',
  },
}
SCSS
$custom: #40237f;
$custom-light: #7b60a5;
$custom-dark: #000000;
JSON
{
  "hex": "#40237f",
  "rgb": {
    "r": 64,
    "g": 35,
    "b": 127
  },
  "hsl": {
    "h": 258.913,
    "s": 56.79,
    "l": 31.765
  },
  "oklch": {
    "l": 0.35297,
    "c": 0.14551,
    "h": 291.6
  },
  "luminance": 0.03824
}

Semantic roles & 50–950 ramp

primary
#40237F
secondary
#92B14C
accent
#E048B0
background
#F7F5FA
surface
#EEEAF4
border
#C9C6CE
text
#0A050F
muted
#7C797F

Preview Lab

Preview with #40237F

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

Preview Lab → · Contrast checker → · Palette generator →

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