#342172#342172

#342172 is a dark, vivid violet. Relative luminance 0.030; OKLCH L 32.5% C 0.132 H 287.5°. Best body text is #FFFFFF at 13.07:1 contrast (WCAG AA passes).

Color values

HEX#342172
RGBrgb(52, 33, 114)
HSLhsl(254, 55%, 29%)
HSVhsv(254, 71%, 45%)
CMYKcmyk(54.4%, 71.1%, 0%, 55.3%)
CIE-LABlab(20.17, 31.38, -43.69)
CIE-LCHlch(20.17, 53.80, 305.69°)
OKLaboklab(32.54% 0.0395 -0.1254)
OKLCHoklch(32.54% 0.132 287.5)
XYZxyz(4.9964, 3.0324, 16.2384)
Luminance0.0303 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#342172 #5F7221
analogous
#213772 #342172 #5D2172
triadic
#342172 #723421 #217234
tetradic
#342172 #722137 #5F7221 #21725D
square
#342172 #722137 #5F7221 #21725D
split-complementary
#342172 #725D21 #377221
monochromatic
#0B0718 #1E1343 #342172 #4A2FA1 #6444C9

Accessibility & contrast

On white

13.07
#342172 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.61
#342172 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #342172
13.07:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##342172#FFFFFF#000000##FFFFFF
##3421721.0013.071.6113.07
#FFFFFF13.071.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.071.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003374
Deuteranopia (green-blind)
#002E70
Tritanopia (blue-blind)
#1C3646
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #342172;
/* rgb */ color: rgb(52, 33, 114);
/* oklch */ color: oklch(32.5% 0.132 287.5);
Tailwind
colors: {
  custom: {
    50: '#725e9b',
    500: '#342172',
    950: '#000000',
  },
}
SCSS
$custom: #342172;
$custom-light: #725e9b;
$custom-dark: #000000;
JSON
{
  "hex": "#342172",
  "rgb": {
    "r": 52,
    "g": 33,
    "b": 114
  },
  "hsl": {
    "h": 254.074,
    "s": 55.102,
    "l": 28.824
  },
  "oklch": {
    "l": 0.32544,
    "c": 0.13153,
    "h": 287.5
  },
  "luminance": 0.03033
}

Semantic roles & 50–950 ramp

primary
#342172
secondary
#90A549
accent
#DE49BB
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040E
muted
#7B797E

Preview Lab

Preview with #342172

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

Preview Lab → · Contrast checker → · Palette generator →

#342172 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva