#4D178C#4D178C

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

Color values

HEX#4D178C
RGBrgb(77, 23, 140)
HSLhsl(268, 72%, 32%)
HSVhsv(268, 84%, 55%)
CMYKcmyk(45%, 83.6%, 0%, 45.1%)
CIE-LABlab(23.95, 47.84, -53.87)
CIE-LCHlch(23.95, 72.04, 311.61°)
OKLaboklab(36.64% 0.0808 -0.1543)
OKLCHoklch(36.64% 0.174 297.6)
XYZxyz(8.0993, 4.0839, 25.1674)
Luminance0.0408 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4D178C #568C17
analogous
#171C8C #4D178C #88178C
triadic
#4D178C #8C4D17 #178C4D
tetradic
#4D178C #8C171C #568C17 #178C88
square
#4D178C #8C171C #568C17 #178C88
split-complementary
#4D178C #8C8817 #1C8C17
monochromatic
#130623 #300E57 #4D178C #6A20C1 #883EDF

Accessibility & contrast

On white

11.56
#4D178C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #4D178C
11.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4D178C#FFFFFF#000000##FFFFFF
##4D178C1.0011.561.8211.56
#FFFFFF11.561.0021.001.00
#0000001.8221.001.0021.00
##FFFFFF11.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00398F
Deuteranopia (green-blind)
#00388A
Tritanopia (blue-blind)
#3C3953
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #4d178c;
/* rgb */ color: rgb(77, 23, 140);
/* oklch */ color: oklch(36.6% 0.174 297.6);
Tailwind
colors: {
  custom: {
    50: '#865caf',
    500: '#4d178c',
    950: '#000000',
  },
}
SCSS
$custom: #4d178c;
$custom-light: #865caf;
$custom-dark: #000000;
JSON
{
  "hex": "#4d178c",
  "rgb": {
    "r": 77,
    "g": 23,
    "b": 140
  },
  "hsl": {
    "h": 267.692,
    "s": 71.779,
    "l": 31.961
  },
  "oklch": {
    "l": 0.3664,
    "c": 0.1742,
    "h": 297.6
  },
  "luminance": 0.04084
}

Semantic roles & 50–950 ramp

primary
#4D178C
secondary
#84BF3F
accent
#EF399B
background
#F8F5FA
surface
#F0E9F5
border
#CBC5CF
text
#0C0410
muted
#7D797F

Preview Lab

Preview with #4D178C

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

Preview Lab → · Contrast checker → · Palette generator →

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