#4C178F#4C178F

#4C178F is a dark, vivid violet. Relative luminance 0.041; OKLCH L 36.8% C 0.177 H 296.2°. Best body text is #FFFFFF at 11.50:1 contrast (WCAG AA passes).

Color values

HEX#4C178F
RGBrgb(76, 23, 143)
HSLhsl(267, 72%, 33%)
HSVhsv(267, 84%, 56%)
CMYKcmyk(46.9%, 83.9%, 0%, 43.9%)
CIE-LABlab(24.10, 48.46, -55.48)
CIE-LCHlch(24.10, 73.67, 311.14°)
OKLaboklab(36.81% 0.0782 -0.1591)
OKLCHoklch(36.81% 0.177 296.2)
XYZxyz(8.2435, 4.1323, 26.3446)
Luminance0.0413 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4C178F #5A8F17
analogous
#171E8F #4C178F #88178F
triadic
#4C178F #8F4C17 #178F4C
tetradic
#4C178F #8F171E #5A8F17 #178F88
square
#4C178F #8F171E #5A8F17 #178F88
split-complementary
#4C178F #8F8817 #1E8F17
monochromatic
#140626 #300F5A #4C178F #681FC4 #8740E0

Accessibility & contrast

On white

11.50
#4C178F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.83
#4C178F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4C178F
11.50:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4C178F#FFFFFF#000000##FFFFFF
##4C178F1.0011.501.8311.50
#FFFFFF11.501.0021.001.00
#0000001.8321.001.0021.00
##FFFFFF11.501.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A92
Deuteranopia (green-blind)
#00388D
Tritanopia (blue-blind)
#393A54
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #4c178f;
/* rgb */ color: rgb(76, 23, 143);
/* oklch */ color: oklch(36.8% 0.177 296.2);
Tailwind
colors: {
  custom: {
    50: '#865cb1',
    500: '#4c178f',
    950: '#000000',
  },
}
SCSS
$custom: #4c178f;
$custom-light: #865cb1;
$custom-dark: #000000;
JSON
{
  "hex": "#4c178f",
  "rgb": {
    "r": 76,
    "g": 23,
    "b": 143
  },
  "hsl": {
    "h": 266.5,
    "s": 72.289,
    "l": 32.549
  },
  "oklch": {
    "l": 0.36808,
    "c": 0.17725,
    "h": 296.2
  },
  "luminance": 0.04132
}

Semantic roles & 50–950 ramp

primary
#4C178F
secondary
#88C141
accent
#EF399F
background
#F8F5FB
surface
#F0E9F6
border
#CBC5D0
text
#0C0411
muted
#7D7980

Preview Lab

Preview with #4C178F

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

Preview Lab → · Contrast checker → · Palette generator →

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