#40187C#40187C

#40187C is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.6% C 0.155 H 294.7°. Best body text is #FFFFFF at 12.81:1 contrast (WCAG AA passes).

Color values

HEX#40187C
RGBrgb(64, 24, 124)
HSLhsl(264, 68%, 29%)
HSVhsv(264, 81%, 49%)
CMYKcmyk(48.4%, 80.6%, 0%, 51.4%)
CIE-LABlab(20.82, 41.23, -48.98)
CIE-LCHlch(20.82, 64.03, 310.09°)
OKLaboklab(33.62% 0.0645 -0.1405)
OKLCHoklch(33.62% 0.155 294.7)
XYZxyz(6.0781, 3.1983, 19.3620)
Luminance0.0320 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40187C #547C18
analogous
#18227C #40187C #72187C
triadic
#40187C #7C4018 #187C40
tetradic
#40187C #7C1822 #547C18 #187C72
square
#40187C #7C1822 #547C18 #187C72
split-complementary
#40187C #7C7218 #227C18
monochromatic
#0D051A #260E49 #40187C #5A22AF #7736D8

Accessibility & contrast

On white

12.81
#40187C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.64
#40187C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40187C
12.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40187C#FFFFFF#000000##FFFFFF
##40187C1.0012.811.6412.81
#FFFFFF12.811.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.811.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00337F
Deuteranopia (green-blind)
#00307A
Tritanopia (blue-blind)
#2E344A
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #40187c;
/* rgb */ color: rgb(64, 24, 124);
/* oklch */ color: oklch(33.6% 0.155 294.7);
Tailwind
colors: {
  custom: {
    50: '#7c5aa3',
    500: '#40187c',
    950: '#000000',
  },
}
SCSS
$custom: #40187c;
$custom-light: #7c5aa3;
$custom-dark: #000000;
JSON
{
  "hex": "#40187c",
  "rgb": {
    "r": 64,
    "g": 24,
    "b": 124
  },
  "hsl": {
    "h": 264,
    "s": 67.568,
    "l": 29.02
  },
  "oklch": {
    "l": 0.33617,
    "c": 0.15458,
    "h": 294.7
  },
  "luminance": 0.03198
}

Semantic roles & 50–950 ramp

primary
#40187C
secondary
#83B13F
accent
#EA3DA5
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #40187C

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

Preview Lab → · Contrast checker → · Palette generator →

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