#3A1F97#3A1F97

#3A1F97 is a dark, vivid violet. Relative luminance 0.041; OKLCH L 36.5% C 0.180 H 283.3°. Best body text is #FFFFFF at 11.52:1 contrast (WCAG AA passes).

Color values

HEX#3A1F97
RGBrgb(58, 31, 151)
HSLhsl(254, 66%, 36%)
HSVhsv(254, 79%, 59%)
CMYKcmyk(61.6%, 79.5%, 0%, 40.8%)
CIE-LABlab(24.04, 44.86, -60.60)
CIE-LCHlch(24.04, 75.40, 306.51°)
OKLaboklab(36.53% 0.0414 -0.1747)
OKLCHoklch(36.53% 0.18 283.3)
XYZxyz(7.8191, 4.1133, 29.6541)
Luminance0.0411 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#3A1F97 #7C971F
analogous
#1F4097 #3A1F97 #761F97
triadic
#3A1F97 #973A1F #1F973A
tetradic
#3A1F97 #971F40 #7C971F #1F9776
square
#3A1F97 #971F40 #7C971F #1F9776
split-complementary
#3A1F97 #97761F #40971F
monochromatic
#130A31 #261564 #3A1F97 #4E29CA #7354DC

Accessibility & contrast

On white

11.52
#3A1F97 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.82
#3A1F97 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #3A1F97
11.52:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##3A1F97#FFFFFF#000000##FFFFFF
##3A1F971.0011.521.8211.52
#FFFFFF11.521.0021.001.00
#0000001.8221.001.0021.00
##FFFFFF11.521.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D9A
Deuteranopia (green-blind)
#003595
Tritanopia (blue-blind)
#00425B
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #3a1f97;
/* rgb */ color: rgb(58, 31, 151);
/* oklch */ color: oklch(36.5% 0.180 283.3);
Tailwind
colors: {
  custom: {
    50: '#7d5fb7',
    500: '#3a1f97',
    950: '#000000',
  },
}
SCSS
$custom: #3a1f97;
$custom-light: #7d5fb7;
$custom-dark: #000000;
JSON
{
  "hex": "#3a1f97",
  "rgb": {
    "r": 58,
    "g": 31,
    "b": 151
  },
  "hsl": {
    "h": 253.5,
    "s": 65.934,
    "l": 35.686
  },
  "oklch": {
    "l": 0.36533,
    "c": 0.17956,
    "h": 283.3
  },
  "luminance": 0.04114
}

Semantic roles & 50–950 ramp

primary
#3A1F97
secondary
#A7BF52
accent
#E93FC3
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #3A1F97

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

Preview Lab → · Contrast checker → · Palette generator →

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