#40177E#40177E

#40177E is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.7% C 0.158 H 294.2°. Best body text is #FFFFFF at 12.79:1 contrast (WCAG AA passes).

Color values

HEX#40177E
RGBrgb(64, 23, 126)
HSLhsl(264, 69%, 29%)
HSVhsv(264, 82%, 49%)
CMYKcmyk(49.2%, 81.7%, 0%, 50.6%)
CIE-LABlab(20.86, 42.23, -50.19)
CIE-LCHlch(20.86, 65.59, 310.08°)
OKLaboklab(33.71% 0.0647 -0.144)
OKLCHoklch(33.71% 0.158 294.2)
XYZxyz(6.1856, 3.2090, 20.0281)
Luminance0.0321 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40177E #557E17
analogous
#17227E #40177E #74177E
triadic
#40177E #7E4017 #177E40
tetradic
#40177E #7E1722 #557E17 #177E74
square
#40177E #7E1722 #557E17 #177E74
split-complementary
#40177E #7E7417 #227E17
monochromatic
#0D051A #260E4A #40177E #5A20B2 #7735DA

Accessibility & contrast

On white

12.79
#40177E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.64
#40177E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40177E
12.79:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40177E#FFFFFF#000000##FFFFFF
##40177E1.0012.791.6412.79
#FFFFFF12.791.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.791.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003381
Deuteranopia (green-blind)
#00307C
Tritanopia (blue-blind)
#2D344B
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #40177e;
/* rgb */ color: rgb(64, 23, 126);
/* oklch */ color: oklch(33.7% 0.158 294.2);
Tailwind
colors: {
  custom: {
    50: '#7c5aa4',
    500: '#40177e',
    950: '#000000',
  },
}
SCSS
$custom: #40177e;
$custom-light: #7c5aa4;
$custom-dark: #000000;
JSON
{
  "hex": "#40177e",
  "rgb": {
    "r": 64,
    "g": 23,
    "b": 126
  },
  "hsl": {
    "h": 263.883,
    "s": 69.128,
    "l": 29.216
  },
  "oklch": {
    "l": 0.33705,
    "c": 0.15785,
    "h": 294.2
  },
  "luminance": 0.03209
}

Semantic roles & 50–950 ramp

primary
#40177E
secondary
#84B33E
accent
#EC3CA6
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #40177E

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

Preview Lab → · Contrast checker → · Palette generator →

#40177E Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva