#4C178D#4C178D

#4C178D is a dark, vivid violet. Relative luminance 0.041; OKLCH L 36.6% C 0.175 H 296.8°. Best body text is #FFFFFF at 11.57:1 contrast (WCAG AA passes).

Color values

HEX#4C178D
RGBrgb(76, 23, 141)
HSLhsl(267, 72%, 32%)
HSVhsv(267, 84%, 55%)
CMYKcmyk(46.1%, 83.7%, 0%, 44.7%)
CIE-LABlab(23.91, 47.95, -54.56)
CIE-LCHlch(23.91, 72.63, 311.31°)
OKLaboklab(36.61% 0.0789 -0.1564)
OKLCHoklch(36.61% 0.175 296.8)
XYZxyz(8.0933, 4.0722, 25.5537)
Luminance0.0407 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4C178D #588D17
analogous
#171D8D #4C178D #87178D
triadic
#4C178D #8D4C17 #178D4C
tetradic
#4C178D #8D171D #588D17 #178D87
square
#4C178D #8D171D #588D17 #178D87
split-complementary
#4C178D #8D8717 #1D8D17
monochromatic
#130624 #300E58 #4C178D #6820C2 #873FE0

Accessibility & contrast

On white

11.57
#4C178D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.81
#4C178D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4C178D
11.57:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4C178D#FFFFFF#000000##FFFFFF
##4C178D1.0011.571.8111.57
#FFFFFF11.571.0021.001.00
#0000001.8121.001.0021.00
##FFFFFF11.571.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003990
Deuteranopia (green-blind)
#00378B
Tritanopia (blue-blind)
#3A3A53
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #4c178d;
/* rgb */ color: rgb(76, 23, 141);
/* oklch */ color: oklch(36.6% 0.175 296.8);
Tailwind
colors: {
  custom: {
    50: '#855caf',
    500: '#4c178d',
    950: '#000000',
  },
}
SCSS
$custom: #4c178d;
$custom-light: #855caf;
$custom-dark: #000000;
JSON
{
  "hex": "#4c178d",
  "rgb": {
    "r": 76,
    "g": 23,
    "b": 141
  },
  "hsl": {
    "h": 266.949,
    "s": 71.951,
    "l": 32.157
  },
  "oklch": {
    "l": 0.36614,
    "c": 0.17515,
    "h": 296.8
  },
  "luminance": 0.04072
}

Semantic roles & 50–950 ramp

primary
#4C178D
secondary
#86C040
accent
#EF399D
background
#F8F5FA
surface
#F0E9F5
border
#CBC5CF
text
#0C0411
muted
#7D7980

Preview Lab

Preview with #4C178D

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

Preview Lab → · Contrast checker → · Palette generator →

#4C178D Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva