#3A1B8B#3A1B8B

#3A1B8B is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.8% C 0.169 H 286.4°. Best body text is #FFFFFF at 12.29:1 contrast (WCAG AA passes).

Color values

HEX#3A1B8B
RGBrgb(58, 27, 139)
HSLhsl(257, 67%, 33%)
HSVhsv(257, 81%, 55%)
CMYKcmyk(58.3%, 80.6%, 0%, 45.5%)
CIE-LABlab(22.11, 43.24, -56.34)
CIE-LCHlch(22.11, 71.02, 307.51°)
OKLaboklab(34.81% 0.0477 -0.1622)
OKLCHoklch(34.81% 0.169 286.4)
XYZxyz(6.7957, 3.5471, 24.7477)
Luminance0.0355 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#3A1B8B #6C8B1B
analogous
#1B348B #3A1B8B #721B8B
triadic
#3A1B8B #8B3A1B #1B8B3A
tetradic
#3A1B8B #8B1B34 #6C8B1B #1B8B72
square
#3A1B8B #8B1B34 #6C8B1B #1B8B72
split-complementary
#3A1B8B #8B721B #348B1B
monochromatic
#0F0725 #251158 #3A1B8B #4F25BE #6F45DB

Accessibility & contrast

On white

12.29
#3A1B8B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.71
#3A1B8B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #3A1B8B
12.29:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##3A1B8B#FFFFFF#000000##FFFFFF
##3A1B8B1.0012.291.7112.29
#FFFFFF12.291.0021.001.00
#0000001.7121.001.0021.00
##FFFFFF12.291.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00388E
Deuteranopia (green-blind)
#003289
Tritanopia (blue-blind)
#123C53
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #3a1b8b;
/* rgb */ color: rgb(58, 27, 139);
/* oklch */ color: oklch(34.8% 0.169 286.4);
Tailwind
colors: {
  custom: {
    50: '#7b5cae',
    500: '#3a1b8b',
    950: '#000000',
  },
}
SCSS
$custom: #3a1b8b;
$custom-light: #7b5cae;
$custom-dark: #000000;
JSON
{
  "hex": "#3a1b8b",
  "rgb": {
    "r": 58,
    "g": 27,
    "b": 139
  },
  "hsl": {
    "h": 256.607,
    "s": 67.47,
    "l": 32.549
  },
  "oklch": {
    "l": 0.34812,
    "c": 0.16912,
    "h": 286.4
  },
  "luminance": 0.03547
}

Semantic roles & 50–950 ramp

primary
#3A1B8B
secondary
#9BBC45
accent
#EA3DBA
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #3A1B8B

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

Preview Lab → · Contrast checker → · Palette generator →

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