#4D157E#4D157E

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

Color values

HEX#4D157E
RGBrgb(77, 21, 126)
HSLhsl(272, 71%, 29%)
HSVhsv(272, 83%, 49%)
CMYKcmyk(38.9%, 83.3%, 0%, 50.6%)
CIE-LABlab(22.37, 45.11, -47.64)
CIE-LCHlch(22.37, 65.60, 313.44°)
OKLaboklab(35.15% 0.087 -0.136)
OKLCHoklch(35.15% 0.161 302.6)
XYZxyz(7.0937, 3.6205, 20.0597)
Luminance0.0362 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4D157E #467E15
analogous
#19157E #4D157E #7E157B
triadic
#4D157E #7E4D15 #157E4D
tetradic
#4D157E #7E1915 #467E15 #157B7E
square
#4D157E #7E1915 #467E15 #157B7E
split-complementary
#4D157E #7B7E15 #157E19
monochromatic
#10041A #2D0C4A #4D157E #6D1EB2 #8C31DD

Accessibility & contrast

On white

12.18
#4D157E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #4D157E
12.18:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4D157E#FFFFFF#000000##FFFFFF
##4D157E1.0012.181.7212.18
#FFFFFF12.181.0021.001.00
#0000001.7221.001.0021.00
##FFFFFF12.181.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #4d157e;
/* rgb */ color: rgb(77, 21, 126);
/* oklch */ color: oklch(35.1% 0.161 302.6);
Tailwind
colors: {
  custom: {
    50: '#845aa4',
    500: '#4d157e',
    950: '#000000',
  },
}
SCSS
$custom: #4d157e;
$custom-light: #845aa4;
$custom-dark: #000000;
JSON
{
  "hex": "#4d157e",
  "rgb": {
    "r": 77,
    "g": 21,
    "b": 126
  },
  "hsl": {
    "h": 272,
    "s": 71.429,
    "l": 28.824
  },
  "oklch": {
    "l": 0.35148,
    "c": 0.16147,
    "h": 302.6
  },
  "luminance": 0.0362
}

Semantic roles & 50–950 ramp

primary
#4D157E
secondary
#73B33C
accent
#EE3A8E
background
#F8F5FA
surface
#F0E9F4
border
#CBC5CE
text
#0B040F
muted
#7C797F

Preview Lab

Preview with #4D157E

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

Preview Lab → · Contrast checker → · Palette generator →

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