#40187F#40187F

#40187F is a dark, vivid violet. Relative luminance 0.033; OKLCH L 33.9% C 0.158 H 293.7°. Best body text is #FFFFFF at 12.69:1 contrast (WCAG AA passes).

Color values

HEX#40187F
RGBrgb(64, 24, 127)
HSLhsl(263, 68%, 30%)
HSVhsv(263, 81%, 50%)
CMYKcmyk(49.6%, 81.1%, 0%, 50.2%)
CIE-LABlab(21.11, 42.06, -50.41)
CIE-LCHlch(21.11, 65.65, 309.84°)
OKLaboklab(33.91% 0.0635 -0.1446)
OKLCHoklch(33.91% 0.158 293.7)
XYZxyz(6.2707, 3.2754, 20.3764)
Luminance0.0328 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40187F #577F18
analogous
#18247F #40187F #74187F
triadic
#40187F #7F4018 #187F40
tetradic
#40187F #7F1824 #577F18 #187F74
square
#40187F #7F1824 #577F18 #187F74
split-complementary
#40187F #7F7418 #247F18
monochromatic
#0D051A #260E4C #40187F #5A22B2 #7738D9

Accessibility & contrast

On white

12.69
#40187F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.66
#40187F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40187F
12.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40187F#FFFFFF#000000##FFFFFF
##40187F1.0012.691.6612.69
#FFFFFF12.691.0021.001.00
#0000001.6621.001.0021.00
##FFFFFF12.691.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003482
Deuteranopia (green-blind)
#00317D
Tritanopia (blue-blind)
#2D354B
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #40187f;
/* rgb */ color: rgb(64, 24, 127);
/* oklch */ color: oklch(33.9% 0.158 293.7);
Tailwind
colors: {
  custom: {
    50: '#7c5aa5',
    500: '#40187f',
    950: '#000000',
  },
}
SCSS
$custom: #40187f;
$custom-light: #7c5aa5;
$custom-dark: #000000;
JSON
{
  "hex": "#40187f",
  "rgb": {
    "r": 64,
    "g": 24,
    "b": 127
  },
  "hsl": {
    "h": 263.301,
    "s": 68.212,
    "l": 29.608
  },
  "oklch": {
    "l": 0.33911,
    "c": 0.15799,
    "h": 293.7
  },
  "luminance": 0.03276
}

Semantic roles & 50–950 ramp

primary
#40187F
secondary
#86B33F
accent
#EB3DA7
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #40187F

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

Preview Lab → · Contrast checker → · Palette generator →

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