#4C178E#4C178E

#4C178E is a dark, vivid violet. Relative luminance 0.041; OKLCH L 36.7% C 0.176 H 296.5°. Best body text is #FFFFFF at 11.54:1 contrast (WCAG AA passes).

Color values

HEX#4C178E
RGBrgb(76, 23, 142)
HSLhsl(267, 72%, 32%)
HSVhsv(267, 84%, 56%)
CMYKcmyk(46.5%, 83.8%, 0%, 44.3%)
CIE-LABlab(24.01, 48.21, -55.02)
CIE-LCHlch(24.01, 73.15, 311.22°)
OKLaboklab(36.71% 0.0785 -0.1577)
OKLCHoklch(36.71% 0.176 296.5)
XYZxyz(8.1681, 4.1021, 25.9474)
Luminance0.0410 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4C178E #598E17
analogous
#171D8E #4C178E #88178E
triadic
#4C178E #8E4C17 #178E4C
tetradic
#4C178E #8E171D #598E17 #178E88
square
#4C178E #8E171D #598E17 #178E88
split-complementary
#4C178E #8E8817 #1D8E17
monochromatic
#140625 #300E59 #4C178E #6820C3 #873FE0

Accessibility & contrast

On white

11.54
#4C178E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.82
#4C178E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4C178E
11.54:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4C178E#FFFFFF#000000##FFFFFF
##4C178E1.0011.541.8211.54
#FFFFFF11.541.0021.001.00
#0000001.8221.001.0021.00
##FFFFFF11.541.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A91
Deuteranopia (green-blind)
#00378C
Tritanopia (blue-blind)
#3A3A54
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #4c178e;
/* rgb */ color: rgb(76, 23, 142);
/* oklch */ color: oklch(36.7% 0.176 296.5);
Tailwind
colors: {
  custom: {
    50: '#865cb0',
    500: '#4c178e',
    950: '#000000',
  },
}
SCSS
$custom: #4c178e;
$custom-light: #865cb0;
$custom-dark: #000000;
JSON
{
  "hex": "#4c178e",
  "rgb": {
    "r": 76,
    "g": 23,
    "b": 142
  },
  "hsl": {
    "h": 266.723,
    "s": 72.121,
    "l": 32.353
  },
  "oklch": {
    "l": 0.36711,
    "c": 0.17619,
    "h": 296.5
  },
  "luminance": 0.04102
}

Semantic roles & 50–950 ramp

primary
#4C178E
secondary
#87C040
accent
#EF399E
background
#F8F5FB
surface
#F0E9F6
border
#CBC5D0
text
#0C0411
muted
#7D7980

Preview Lab

Preview with #4C178E

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

Preview Lab → · Contrast checker → · Palette generator →

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