#4C157E#4C157E

#4C157E is a dark, vivid violet. Relative luminance 0.036; OKLCH L 35.0% C 0.161 H 302.0°. Best body text is #FFFFFF at 12.24:1 contrast (WCAG AA passes).

Color values

HEX#4C157E
RGBrgb(76, 21, 126)
HSLhsl(271, 71%, 29%)
HSVhsv(271, 83%, 49%)
CMYKcmyk(39.7%, 83.3%, 0%, 50.6%)
CIE-LABlab(22.23, 44.94, -47.88)
CIE-LCHlch(22.23, 65.67, 313.18°)
OKLaboklab(35.02% 0.0854 -0.1368)
OKLCHoklch(35.02% 0.161 302)
XYZxyz(7.0136, 3.5792, 20.0560)
Luminance0.0358 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4C157E #477E15
analogous
#18157E #4C157E #7E157C
triadic
#4C157E #7E4C15 #157E4C
tetradic
#4C157E #7E1815 #477E15 #157C7E
square
#4C157E #7E1815 #477E15 #157C7E
split-complementary
#4C157E #7C7E15 #157E18
monochromatic
#10041A #2C0C4A #4C157E #6C1EB2 #8B31DD

Accessibility & contrast

On white

12.24
#4C157E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.72
#4C157E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4C157E
12.24:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4C157E#FFFFFF#000000##FFFFFF
##4C157E1.0012.241.7212.24
#FFFFFF12.241.0021.001.00
#0000001.7221.001.0021.00
##FFFFFF12.241.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003481
Deuteranopia (green-blind)
#00357C
Tritanopia (blue-blind)
#41324A
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #4c157e;
/* rgb */ color: rgb(76, 21, 126);
/* oklch */ color: oklch(35.0% 0.161 302.0);
Tailwind
colors: {
  custom: {
    50: '#845aa4',
    500: '#4c157e',
    950: '#000000',
  },
}
SCSS
$custom: #4c157e;
$custom-light: #845aa4;
$custom-dark: #000000;
JSON
{
  "hex": "#4c157e",
  "rgb": {
    "r": 76,
    "g": 21,
    "b": 126
  },
  "hsl": {
    "h": 271.429,
    "s": 71.429,
    "l": 28.824
  },
  "oklch": {
    "l": 0.35015,
    "c": 0.16128,
    "h": 302
  },
  "luminance": 0.03579
}

Semantic roles & 50–950 ramp

primary
#4C157E
secondary
#75B33C
accent
#EE3A90
background
#F8F5FA
surface
#F0E9F4
border
#CBC5CE
text
#0B040F
muted
#7C797F

Preview Lab

Preview with #4C157E

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

Preview Lab → · Contrast checker → · Palette generator →

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