#4A178B#4A178B

#4A178B is a dark, vivid violet. Relative luminance 0.039; OKLCH L 36.2% C 0.173 H 296.2°. Best body text is #FFFFFF at 11.75:1 contrast (WCAG AA passes).

Color values

HEX#4A178B
RGBrgb(74, 23, 139)
HSLhsl(266, 72%, 32%)
HSVhsv(266, 83%, 55%)
CMYKcmyk(46.8%, 83.5%, 0%, 45.5%)
CIE-LABlab(23.45, 47.15, -54.08)
CIE-LCHlch(23.45, 71.75, 311.09°)
OKLaboklab(36.18% 0.0764 -0.155)
OKLCHoklch(36.18% 0.173 296.2)
XYZxyz(7.7894, 3.9325, 24.7697)
Luminance0.0393 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4A178B #588B17
analogous
#171E8B #4A178B #84178B
triadic
#4A178B #8B4A17 #178B4A
tetradic
#4A178B #8B171E #588B17 #178B84
square
#4A178B #8B171E #588B17 #178B84
split-complementary
#4A178B #8B8417 #1E8B17
monochromatic
#120622 #2E0E56 #4A178B #6620C0 #843DDF

Accessibility & contrast

On white

11.75
#4A178B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.79
#4A178B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4A178B
11.75:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4A178B#FFFFFF#000000##FFFFFF
##4A178B1.0011.751.7911.75
#FFFFFF11.751.0021.001.00
#0000001.7921.001.0021.00
##FFFFFF11.751.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00388E
Deuteranopia (green-blind)
#003689
Tritanopia (blue-blind)
#383952
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #4a178b;
/* rgb */ color: rgb(74, 23, 139);
/* oklch */ color: oklch(36.2% 0.173 296.2);
Tailwind
colors: {
  custom: {
    50: '#845cae',
    500: '#4a178b',
    950: '#000000',
  },
}
SCSS
$custom: #4a178b;
$custom-light: #845cae;
$custom-dark: #000000;
JSON
{
  "hex": "#4a178b",
  "rgb": {
    "r": 74,
    "g": 23,
    "b": 139
  },
  "hsl": {
    "h": 266.379,
    "s": 71.605,
    "l": 31.765
  },
  "oklch": {
    "l": 0.36177,
    "c": 0.17283,
    "h": 296.2
  },
  "luminance": 0.03933
}

Semantic roles & 50–950 ramp

primary
#4A178B
secondary
#87BF3F
accent
#EE399F
background
#F8F5FA
surface
#F0E9F4
border
#CBC5CE
text
#0C0410
muted
#7D797F

Preview Lab

Preview with #4A178B

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

Preview Lab → · Contrast checker → · Palette generator →

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