#3A158F#3A158F

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

Color values

HEX#3A158F
RGBrgb(58, 21, 143)
HSLhsl(258, 74%, 32%)
HSVhsv(258, 85%, 56%)
CMYKcmyk(59.4%, 85.3%, 0%, 43.9%)
CIE-LABlab(21.65, 47.00, -59.60)
CIE-LCHlch(21.65, 75.91, 308.26°)
OKLaboklab(34.62% 0.05 -0.1717)
OKLCHoklch(34.62% 0.179 286.2)
XYZxyz(6.9695, 3.4186, 26.2739)
Luminance0.0342 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#3A158F #6A8F15
analogous
#152D8F #3A158F #77158F
triadic
#3A158F #8F3A15 #158F3A
tetradic
#3A158F #8F152D #6A8F15 #158F77
square
#3A158F #8F152D #6A8F15 #158F77
split-complementary
#3A158F #8F7715 #2D8F15
monochromatic
#0F0524 #240D5A #3A158F #501DC4 #6E3CE2

Accessibility & contrast

On white

12.47
#3A158F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.68
#3A158F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #3A158F
12.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##3A158F#FFFFFF#000000##FFFFFF
##3A158F1.0012.471.6812.47
#FFFFFF12.471.0021.001.00
#0000001.6821.001.0021.00
##FFFFFF12.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003792
Deuteranopia (green-blind)
#00308D
Tritanopia (blue-blind)
#0B3B54
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #3a158f;
/* rgb */ color: rgb(58, 21, 143);
/* oklch */ color: oklch(34.6% 0.179 286.2);
Tailwind
colors: {
  custom: {
    50: '#7c59b1',
    500: '#3a158f',
    950: '#000000',
  },
}
SCSS
$custom: #3a158f;
$custom-light: #7c59b1;
$custom-dark: #000000;
JSON
{
  "hex": "#3a158f",
  "rgb": {
    "r": 58,
    "g": 21,
    "b": 143
  },
  "hsl": {
    "h": 258.197,
    "s": 74.39,
    "l": 32.157
  },
  "oklch": {
    "l": 0.34619,
    "c": 0.17882,
    "h": 286.2
  },
  "luminance": 0.03419
}

Semantic roles & 50–950 ramp

primary
#3A158F
secondary
#9AC23E
accent
#F137B9
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0B0411
muted
#7C7980

Preview Lab

Preview with #3A158F

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

Preview Lab → · Contrast checker → · Palette generator →

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