#4C187E#4C187E

#4C187E is a dark, vivid violet. Relative luminance 0.037; OKLCH L 35.3% C 0.158 H 301.6°. Best body text is #FFFFFF at 12.07:1 contrast (WCAG AA passes).

Color values

HEX#4C187E
RGBrgb(76, 24, 126)
HSLhsl(271, 68%, 29%)
HSVhsv(271, 81%, 49%)
CMYKcmyk(39.7%, 81%, 0%, 50.6%)
CIE-LABlab(22.64, 43.75, -47.21)
CIE-LCHlch(22.64, 64.36, 312.82°)
OKLaboklab(35.3% 0.083 -0.1348)
OKLCHoklch(35.3% 0.158 301.6)
XYZxyz(7.0721, 3.6961, 20.0754)
Luminance0.0370 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4C187E #4A7E18
analogous
#19187E #4C187E #7E187D
triadic
#4C187E #7E4C18 #187E4C
tetradic
#4C187E #7E1918 #4A7E18 #187D7E
square
#4C187E #7E1918 #4A7E18 #187D7E
split-complementary
#4C187E #7D7E18 #187E19
monochromatic
#10051A #2D0E4B #4C187E #6B22B1 #8A37D9

Accessibility & contrast

On white

12.07
#4C187E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.74
#4C187E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4C187E
12.07:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4C187E#FFFFFF#000000##FFFFFF
##4C187E1.0012.071.7412.07
#FFFFFF12.071.0021.001.00
#0000001.7421.001.0021.00
##FFFFFF12.071.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003581
Deuteranopia (green-blind)
#00367C
Tritanopia (blue-blind)
#41334B
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #4c187e;
/* rgb */ color: rgb(76, 24, 126);
/* oklch */ color: oklch(35.3% 0.158 301.6);
Tailwind
colors: {
  custom: {
    50: '#845ca4',
    500: '#4c187e',
    950: '#000000',
  },
}
SCSS
$custom: #4c187e;
$custom-light: #845ca4;
$custom-dark: #000000;
JSON
{
  "hex": "#4c187e",
  "rgb": {
    "r": 76,
    "g": 24,
    "b": 126
  },
  "hsl": {
    "h": 270.588,
    "s": 68,
    "l": 29.412
  },
  "oklch": {
    "l": 0.35302,
    "c": 0.15831,
    "h": 301.6
  },
  "luminance": 0.03696
}

Semantic roles & 50–950 ramp

primary
#4C187E
secondary
#78B23F
accent
#EB3D92
background
#F8F5FA
surface
#F0E9F4
border
#CBC5CE
text
#0B040F
muted
#7C797F

Preview Lab

Preview with #4C187E

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

Preview Lab → · Contrast checker → · Palette generator →

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