#34158A#34158A

#34158A is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.5% C 0.174 H 284.0°. Best body text is #FFFFFF at 12.96:1 contrast (WCAG AA passes).

Color values

HEX#34158A
RGBrgb(52, 21, 138)
HSLhsl(256, 74%, 31%)
HSVhsv(256, 85%, 54%)
CMYKcmyk(62.3%, 84.8%, 0%, 45.9%)
CIE-LABlab(20.44, 44.95, -58.49)
CIE-LCHlch(20.44, 73.77, 307.54°)
OKLaboklab(33.47% 0.042 -0.1686)
OKLCHoklch(33.47% 0.174 284)
XYZxyz(6.2704, 3.1010, 24.3080)
Luminance0.0310 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#34158A #6B8A15
analogous
#15318A #34158A #6E158A
triadic
#34158A #8A3415 #158A34
tetradic
#34158A #8A1531 #6B8A15 #158A6E
square
#34158A #8A1531 #6B8A15 #158A6E
split-complementary
#34158A #8A6E15 #318A15
monochromatic
#0C0520 #200D55 #34158A #481DBF #6539E1

Accessibility & contrast

On white

12.96
#34158A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.62
#34158A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #34158A
12.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##34158A#FFFFFF#000000##FFFFFF
##34158A1.0012.961.6212.96
#FFFFFF12.961.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF12.961.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00358D
Deuteranopia (green-blind)
#002D88
Tritanopia (blue-blind)
#003A51
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #34158a;
/* rgb */ color: rgb(52, 21, 138);
/* oklch */ color: oklch(33.5% 0.174 284.0);
Tailwind
colors: {
  custom: {
    50: '#7858ad',
    500: '#34158a',
    950: '#000000',
  },
}
SCSS
$custom: #34158a;
$custom-light: #7858ad;
$custom-dark: #000000;
JSON
{
  "hex": "#34158a",
  "rgb": {
    "r": 52,
    "g": 21,
    "b": 138
  },
  "hsl": {
    "h": 255.897,
    "s": 73.585,
    "l": 31.176
  },
  "oklch": {
    "l": 0.33474,
    "c": 0.17378,
    "h": 284
  },
  "luminance": 0.03101
}

Semantic roles & 50–950 ramp

primary
#34158A
secondary
#9CBE3D
accent
#F038BF
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #34158A

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

Preview Lab → · Contrast checker → · Palette generator →

#34158A Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva