#4C157B#4C157B

#4C157B is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.7% C 0.158 H 303.1°. Best body text is #FFFFFF at 12.35:1 contrast (WCAG AA passes).

Color values

HEX#4C157B
RGBrgb(76, 21, 123)
HSLhsl(272, 71%, 28%)
HSVhsv(272, 83%, 48%)
CMYKcmyk(38.2%, 82.9%, 0%, 51.8%)
CIE-LABlab(21.95, 44.20, -46.42)
CIE-LCHlch(21.95, 64.10, 313.60°)
OKLaboklab(34.74% 0.0864 -0.1325)
OKLCHoklch(34.74% 0.158 303.1)
XYZxyz(6.8230, 3.5029, 19.0517)
Luminance0.0350 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4C157B #447B15
analogous
#19157B #4C157B #7B1577
triadic
#4C157B #7B4C15 #157B4C
tetradic
#4C157B #7B1915 #447B15 #15777B
square
#4C157B #7B1915 #447B15 #15777B
split-complementary
#4C157B #777B15 #157B19
monochromatic
#10041A #2C0C47 #4C157B #6C1EAF #8C2FDB

Accessibility & contrast

On white

12.35
#4C157B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.70
#4C157B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4C157B
12.35:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4C157B#FFFFFF#000000##FFFFFF
##4C157B1.0012.351.7012.35
#FFFFFF12.351.0021.001.00
#0000001.7021.001.0021.00
##FFFFFF12.351.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00347E
Deuteranopia (green-blind)
#003479
Tritanopia (blue-blind)
#423149
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #4c157b;
/* rgb */ color: rgb(76, 21, 123);
/* oklch */ color: oklch(34.7% 0.158 303.1);
Tailwind
colors: {
  custom: {
    50: '#835aa2',
    500: '#4c157b',
    950: '#000000',
  },
}
SCSS
$custom: #4c157b;
$custom-light: #835aa2;
$custom-dark: #000000;
JSON
{
  "hex": "#4c157b",
  "rgb": {
    "r": 76,
    "g": 21,
    "b": 123
  },
  "hsl": {
    "h": 272.353,
    "s": 70.833,
    "l": 28.235
  },
  "oklch": {
    "l": 0.34741,
    "c": 0.15816,
    "h": 303.1
  },
  "luminance": 0.03503
}

Semantic roles & 50–950 ramp

primary
#4C157B
secondary
#71B03B
accent
#EE3A8D
background
#F8F5FA
surface
#F0E9F4
border
#CBC5CE
text
#0B040F
muted
#7C797F

Preview Lab

Preview with #4C157B

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

Preview Lab → · Contrast checker → · Palette generator →

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