#4A178E#4A178E

#4A178E is a dark, vivid violet. Relative luminance 0.040; OKLCH L 36.5% C 0.176 H 295.3°. Best body text is #FFFFFF at 11.64:1 contrast (WCAG AA passes).

Color values

HEX#4A178E
RGBrgb(74, 23, 142)
HSLhsl(266, 72%, 32%)
HSVhsv(266, 84%, 56%)
CMYKcmyk(47.9%, 83.8%, 0%, 44.3%)
CIE-LABlab(23.74, 47.93, -55.46)
CIE-LCHlch(23.74, 73.30, 310.83°)
OKLaboklab(36.47% 0.0753 -0.1591)
OKLCHoklch(36.47% 0.176 295.3)
XYZxyz(8.0116, 4.0214, 25.9400)
Luminance0.0402 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4A178E #5B8E17
analogous
#17208E #4A178E #85178E
triadic
#4A178E #8E4A17 #178E4A
tetradic
#4A178E #8E1720 #5B8E17 #178E85
square
#4A178E #8E1720 #5B8E17 #178E85
split-complementary
#4A178E #8E8517 #208E17
monochromatic
#130625 #2F0E59 #4A178E #6520C3 #843FE0

Accessibility & contrast

On white

11.64
#4A178E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.80
#4A178E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4A178E
11.64:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4A178E#FFFFFF#000000##FFFFFF
##4A178E1.0011.641.8011.64
#FFFFFF11.641.0021.001.00
#0000001.8021.001.0021.00
##FFFFFF11.641.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003991
Deuteranopia (green-blind)
#00378C
Tritanopia (blue-blind)
#363A54
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #4a178e;
/* rgb */ color: rgb(74, 23, 142);
/* oklch */ color: oklch(36.5% 0.176 295.3);
Tailwind
colors: {
  custom: {
    50: '#845cb0',
    500: '#4a178e',
    950: '#000000',
  },
}
SCSS
$custom: #4a178e;
$custom-light: #845cb0;
$custom-dark: #000000;
JSON
{
  "hex": "#4a178e",
  "rgb": {
    "r": 74,
    "g": 23,
    "b": 142
  },
  "hsl": {
    "h": 265.714,
    "s": 72.121,
    "l": 32.353
  },
  "oklch": {
    "l": 0.3647,
    "c": 0.17602,
    "h": 295.3
  },
  "luminance": 0.04022
}

Semantic roles & 50–950 ramp

primary
#4A178E
secondary
#8AC040
accent
#EF39A1
background
#F8F5FB
surface
#F0E9F6
border
#CBC5D0
text
#0C0411
muted
#7D7980

Preview Lab

Preview with #4A178E

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

Preview Lab → · Contrast checker → · Palette generator →

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