#3A178D#3A178D

#3A178D is a dark, vivid violet. Relative luminance 0.034; OKLCH L 34.6% C 0.175 H 286.5°. Best body text is #FFFFFF at 12.45:1 contrast (WCAG AA passes).

Color values

HEX#3A178D
RGBrgb(58, 23, 141)
HSLhsl(258, 72%, 32%)
HSVhsv(258, 84%, 55%)
CMYKcmyk(58.9%, 83.7%, 0%, 44.7%)
CIE-LABlab(21.71, 45.62, -58.26)
CIE-LCHlch(21.71, 73.99, 308.06°)
OKLaboklab(34.6% 0.0496 -0.1678)
OKLCHoklch(34.6% 0.175 286.5)
XYZxyz(6.8576, 3.4350, 25.4958)
Luminance0.0343 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#3A178D #6A8D17
analogous
#172F8D #3A178D #75178D
triadic
#3A178D #8D3A17 #178D3A
tetradic
#3A178D #8D172F #6A8D17 #178D75
square
#3A178D #8D172F #6A8D17 #178D75
split-complementary
#3A178D #8D7517 #2F8D17
monochromatic
#0F0624 #240E58 #3A178D #5020C2 #6E3FE0

Accessibility & contrast

On white

12.45
#3A178D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.69
#3A178D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #3A178D
12.45:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##3A178D#FFFFFF#000000##FFFFFF
##3A178D1.0012.451.6912.45
#FFFFFF12.451.0021.001.00
#0000001.6921.001.0021.00
##FFFFFF12.451.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003790
Deuteranopia (green-blind)
#00318B
Tritanopia (blue-blind)
#0F3B53
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #3a178d;
/* rgb */ color: rgb(58, 23, 141);
/* oklch */ color: oklch(34.6% 0.175 286.5);
Tailwind
colors: {
  custom: {
    50: '#7b5ab0',
    500: '#3a178d',
    950: '#000000',
  },
}
SCSS
$custom: #3a178d;
$custom-light: #7b5ab0;
$custom-dark: #000000;
JSON
{
  "hex": "#3a178d",
  "rgb": {
    "r": 58,
    "g": 23,
    "b": 141
  },
  "hsl": {
    "h": 257.797,
    "s": 71.951,
    "l": 32.157
  },
  "oklch": {
    "l": 0.34595,
    "c": 0.17497,
    "h": 286.5
  },
  "luminance": 0.03435
}

Semantic roles & 50–950 ramp

primary
#3A178D
secondary
#9AC040
accent
#EF39B9
background
#F8F5FA
surface
#EFE9F5
border
#CAC5CF
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #3A178D

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

Preview Lab → · Contrast checker → · Palette generator →

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