#40177C#40177C

#40177C is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.5% C 0.156 H 294.8°. Best body text is #FFFFFF at 12.87:1 contrast (WCAG AA passes).

Color values

HEX#40177C
RGBrgb(64, 23, 124)
HSLhsl(264, 69%, 29%)
HSVhsv(264, 81%, 49%)
CMYKcmyk(48.4%, 81.5%, 0%, 51.4%)
CIE-LABlab(20.67, 41.68, -49.24)
CIE-LCHlch(20.67, 64.51, 310.25°)
OKLaboklab(33.51% 0.0653 -0.1412)
OKLCHoklch(33.51% 0.156 294.8)
XYZxyz(6.0578, 3.1578, 19.3552)
Luminance0.0316 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40177C #537C17
analogous
#17217C #40177C #73177C
triadic
#40177C #7C4017 #177C40
tetradic
#40177C #7C1721 #537C17 #177C73
square
#40177C #7C1721 #537C17 #177C73
split-complementary
#40177C #7C7317 #217C17
monochromatic
#0D051A #250D48 #40177C #5B21B0 #7734D9

Accessibility & contrast

On white

12.87
#40177C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40177C
12.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40177C#FFFFFF#000000##FFFFFF
##40177C1.0012.871.6312.87
#FFFFFF12.871.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.871.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #40177c;
/* rgb */ color: rgb(64, 23, 124);
/* oklch */ color: oklch(33.5% 0.156 294.8);
Tailwind
colors: {
  custom: {
    50: '#7c5aa3',
    500: '#40177c',
    950: '#000000',
  },
}
SCSS
$custom: #40177c;
$custom-light: #7c5aa3;
$custom-dark: #000000;
JSON
{
  "hex": "#40177c",
  "rgb": {
    "r": 64,
    "g": 23,
    "b": 124
  },
  "hsl": {
    "h": 264.356,
    "s": 68.707,
    "l": 28.824
  },
  "oklch": {
    "l": 0.33508,
    "c": 0.15559,
    "h": 294.8
  },
  "luminance": 0.03158
}

Semantic roles & 50–950 ramp

primary
#40177C
secondary
#82B13E
accent
#EC3CA4
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #40177C

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

Preview Lab → · Contrast checker → · Palette generator →

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