#40237B#40237B

#40237B is a dark, vivid violet. Relative luminance 0.037; OKLCH L 34.9% C 0.140 H 292.8°. Best body text is #FFFFFF at 12.04:1 contrast (WCAG AA passes).

Color values

HEX#40237B
RGBrgb(64, 35, 123)
HSLhsl(260, 56%, 31%)
HSVhsv(260, 72%, 48%)
CMYKcmyk(48%, 71.5%, 0%, 51.8%)
CIE-LABlab(22.73, 35.30, -45.23)
CIE-LCHlch(22.73, 57.37, 307.97°)
OKLaboklab(34.94% 0.0544 -0.1295)
OKLCHoklch(34.94% 0.14 292.8)
XYZxyz(6.2895, 3.7219, 19.1221)
Luminance0.0372 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40237B #5E7B23
analogous
#23327B #40237B #6C237B
triadic
#40237B #7B4023 #237B40
tetradic
#40237B #7B2332 #5E7B23 #237B6C
square
#40237B #7B2332 #5E7B23 #237B6C
split-complementary
#40237B #7B6C23 #327B23
monochromatic
#0E081C #27154B #40237B #5931AB #764CCC

Accessibility & contrast

On white

12.04
#40237B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40237B
12.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40237B#FFFFFF#000000##FFFFFF
##40237B1.0012.041.7412.04
#FFFFFF12.041.0021.001.00
#0000001.7421.001.0021.00
##FFFFFF12.041.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00377E
Deuteranopia (green-blind)
#003579
Tritanopia (blue-blind)
#2E394C
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #40237b;
/* rgb */ color: rgb(64, 35, 123);
/* oklch */ color: oklch(34.9% 0.140 292.8);
Tailwind
colors: {
  custom: {
    50: '#7b60a2',
    500: '#40237b',
    950: '#000000',
  },
}
SCSS
$custom: #40237b;
$custom-light: #7b60a2;
$custom-dark: #000000;
JSON
{
  "hex": "#40237b",
  "rgb": {
    "r": 64,
    "g": 35,
    "b": 123
  },
  "hsl": {
    "h": 259.773,
    "s": 55.696,
    "l": 30.98
  },
  "oklch": {
    "l": 0.34937,
    "c": 0.14046,
    "h": 292.8
  },
  "luminance": 0.03722
}

Semantic roles & 50–950 ramp

primary
#40237B
secondary
#8DAE4C
accent
#DF49AE
background
#F7F5FA
surface
#EEEAF4
border
#C9C6CE
text
#0A050F
muted
#7C797F

Preview Lab

Preview with #40237B

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

Preview Lab → · Contrast checker → · Palette generator →

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