#4A178D#4A178D

#4A178D is a dark, vivid violet. Relative luminance 0.040; OKLCH L 36.4% C 0.175 H 295.6°. Best body text is #FFFFFF at 11.68:1 contrast (WCAG AA passes).

Color values

HEX#4A178D
RGBrgb(74, 23, 141)
HSLhsl(266, 72%, 32%)
HSVhsv(266, 84%, 55%)
CMYKcmyk(47.5%, 83.7%, 0%, 44.7%)
CIE-LABlab(23.64, 47.67, -55.00)
CIE-LCHlch(23.64, 72.79, 310.91°)
OKLaboklab(36.37% 0.0757 -0.1577)
OKLCHoklch(36.37% 0.175 295.6)
XYZxyz(7.9369, 3.9915, 25.5464)
Luminance0.0399 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4A178D #5A8D17
analogous
#171F8D #4A178D #85178D
triadic
#4A178D #8D4A17 #178D4A
tetradic
#4A178D #8D171F #5A8D17 #178D85
square
#4A178D #8D171F #5A8D17 #178D85
split-complementary
#4A178D #8D8517 #1F8D17
monochromatic
#130624 #2E0E58 #4A178D #6620C2 #843FE0

Accessibility & contrast

On white

11.68
#4A178D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #4A178D
11.68:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4A178D#FFFFFF#000000##FFFFFF
##4A178D1.0011.681.8011.68
#FFFFFF11.681.0021.001.00
#0000001.8021.001.0021.00
##FFFFFF11.681.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003990
Deuteranopia (green-blind)
#00378B
Tritanopia (blue-blind)
#373A53
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #4a178d;
/* rgb */ color: rgb(74, 23, 141);
/* oklch */ color: oklch(36.4% 0.175 295.6);
Tailwind
colors: {
  custom: {
    50: '#845caf',
    500: '#4a178d',
    950: '#000000',
  },
}
SCSS
$custom: #4a178d;
$custom-light: #845caf;
$custom-dark: #000000;
JSON
{
  "hex": "#4a178d",
  "rgb": {
    "r": 74,
    "g": 23,
    "b": 141
  },
  "hsl": {
    "h": 265.932,
    "s": 71.951,
    "l": 32.157
  },
  "oklch": {
    "l": 0.36372,
    "c": 0.17496,
    "h": 295.6
  },
  "luminance": 0.03992
}

Semantic roles & 50–950 ramp

primary
#4A178D
secondary
#89C040
accent
#EF39A0
background
#F8F5FA
surface
#F0E9F5
border
#CBC5CF
text
#0C0411
muted
#7D7980

Preview Lab

Preview with #4A178D

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

Preview Lab → · Contrast checker → · Palette generator →

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