#40177B#40177B

#40177B is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.4% C 0.154 H 295.1°. Best body text is #FFFFFF at 12.91:1 contrast (WCAG AA passes).

Color values

HEX#40177B
RGBrgb(64, 23, 123)
HSLhsl(265, 68%, 29%)
HSVhsv(265, 81%, 48%)
CMYKcmyk(48%, 81.3%, 0%, 51.8%)
CIE-LABlab(20.57, 41.41, -48.76)
CIE-LCHlch(20.57, 63.97, 310.34°)
OKLaboklab(33.41% 0.0656 -0.1398)
OKLCHoklch(33.41% 0.154 295.1)
XYZxyz(5.9949, 3.1327, 19.0239)
Luminance0.0313 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40177B #527B17
analogous
#17207B #40177B #72177B
triadic
#40177B #7B4017 #177B40
tetradic
#40177B #7B1720 #527B17 #177B72
square
#40177B #7B1720 #527B17 #177B72
split-complementary
#40177B #7B7217 #207B17
monochromatic
#0D051A #250D47 #40177B #5B21AF #7733D9

Accessibility & contrast

On white

12.91
#40177B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.63
#40177B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40177B
12.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40177B#FFFFFF#000000##FFFFFF
##40177B1.0012.911.6312.91
#FFFFFF12.911.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.911.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00327E
Deuteranopia (green-blind)
#003079
Tritanopia (blue-blind)
#2F3349
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #40177b;
/* rgb */ color: rgb(64, 23, 123);
/* oklch */ color: oklch(33.4% 0.154 295.1);
Tailwind
colors: {
  custom: {
    50: '#7c5aa2',
    500: '#40177b',
    950: '#000000',
  },
}
SCSS
$custom: #40177b;
$custom-light: #7c5aa2;
$custom-dark: #000000;
JSON
{
  "hex": "#40177b",
  "rgb": {
    "r": 64,
    "g": 23,
    "b": 123
  },
  "hsl": {
    "h": 264.6,
    "s": 68.493,
    "l": 28.627
  },
  "oklch": {
    "l": 0.33411,
    "c": 0.15446,
    "h": 295.1
  },
  "luminance": 0.03133
}

Semantic roles & 50–950 ramp

primary
#40177B
secondary
#81B03E
accent
#EB3CA4
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #40177B

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

Preview Lab → · Contrast checker → · Palette generator →

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