#4D178F#4D178F

#4D178F is a dark, vivid violet. Relative luminance 0.042; OKLCH L 36.9% C 0.177 H 296.7°. Best body text is #FFFFFF at 11.45:1 contrast (WCAG AA passes).

Color values

HEX#4D178F
RGBrgb(77, 23, 143)
HSLhsl(267, 72%, 33%)
HSVhsv(267, 84%, 56%)
CMYKcmyk(46.2%, 83.9%, 0%, 43.9%)
CIE-LABlab(24.24, 48.60, -55.26)
CIE-LCHlch(24.24, 73.59, 311.33°)
OKLaboklab(36.93% 0.0798 -0.1584)
OKLCHoklch(36.93% 0.177 296.7)
XYZxyz(8.3236, 4.1736, 26.3483)
Luminance0.0417 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4D178F #598F17
analogous
#171D8F #4D178F #89178F
triadic
#4D178F #8F4D17 #178F4D
tetradic
#4D178F #8F171D #598F17 #178F89
square
#4D178F #8F171D #598F17 #178F89
split-complementary
#4D178F #8F8917 #1D8F17
monochromatic
#140626 #310F5A #4D178F #691FC4 #8840E0

Accessibility & contrast

On white

11.45
#4D178F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #4D178F
11.45:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4D178F#FFFFFF#000000##FFFFFF
##4D178F1.0011.451.8311.45
#FFFFFF11.451.0021.001.00
#0000001.8321.001.0021.00
##FFFFFF11.451.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A92
Deuteranopia (green-blind)
#00388D
Tritanopia (blue-blind)
#3B3A55
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #4d178f;
/* rgb */ color: rgb(77, 23, 143);
/* oklch */ color: oklch(36.9% 0.177 296.7);
Tailwind
colors: {
  custom: {
    50: '#865cb1',
    500: '#4d178f',
    950: '#000000',
  },
}
SCSS
$custom: #4d178f;
$custom-light: #865cb1;
$custom-dark: #000000;
JSON
{
  "hex": "#4d178f",
  "rgb": {
    "r": 77,
    "g": 23,
    "b": 143
  },
  "hsl": {
    "h": 267,
    "s": 72.289,
    "l": 32.549
  },
  "oklch": {
    "l": 0.36929,
    "c": 0.17734,
    "h": 296.7
  },
  "luminance": 0.04174
}

Semantic roles & 50–950 ramp

primary
#4D178F
secondary
#87C141
accent
#EF399D
background
#F8F5FB
surface
#F0E9F6
border
#CBC5D0
text
#0C0411
muted
#7D7980

Preview Lab

Preview with #4D178F

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

Preview Lab → · Contrast checker → · Palette generator →

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