#342158#342158

#342158 is a dark, moderate violet. Relative luminance 0.025; OKLCH L 30.3% C 0.095 H 296.2°. Best body text is #FFFFFF at 13.96:1 contrast (WCAG AA passes).

Color values

HEX#342158
RGBrgb(52, 33, 88)
HSLhsl(261, 45%, 24%)
HSVhsv(261, 63%, 35%)
CMYKcmyk(40.9%, 62.5%, 0%, 65.5%)
CIE-LABlab(18.02, 23.14, -30.12)
CIE-LCHlch(18.02, 37.98, 307.54°)
OKLaboklab(30.3% 0.042 -0.0855)
OKLCHoklch(30.3% 0.095 296.2)
XYZxyz(3.7210, 2.5223, 9.5214)
Luminance0.0252 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#342158 #455821
analogous
#212958 #342158 #4F2158
triadic
#342158 #583421 #215834
tetradic
#342158 #582129 #455821 #21584F
square
#342158 #582129 #455821 #21584F
split-complementary
#342158 #584F21 #295821
monochromatic
#0D0816 #1A102B #342158 #4E3285 #6942B1

Accessibility & contrast

On white

13.96
#342158 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.50
#342158 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #342158
13.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##342158#FFFFFF#000000##FFFFFF
##3421581.0013.961.5013.96
#FFFFFF13.961.0021.001.00
#0000001.5021.001.0021.00
##FFFFFF13.961.0021.001.00

Color blindness preview

Protanopia (red-blind)
#042C5A
Deuteranopia (green-blind)
#0B2B57
Tritanopia (blue-blind)
#2B2D39
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #342158;
/* rgb */ color: rgb(52, 33, 88);
/* oklch */ color: oklch(30.3% 0.095 296.2);
Tailwind
colors: {
  custom: {
    50: '#6e5d87',
    500: '#342158',
    950: '#000000',
  },
}
SCSS
$custom: #342158;
$custom-light: #6e5d87;
$custom-dark: #000000;
JSON
{
  "hex": "#342158",
  "rgb": {
    "r": 52,
    "g": 33,
    "b": 88
  },
  "hsl": {
    "h": 260.727,
    "s": 45.455,
    "l": 23.725
  },
  "oklch": {
    "l": 0.30303,
    "c": 0.09532,
    "h": 296.2
  },
  "luminance": 0.02522
}

Semantic roles & 50–950 ramp

primary
#342158
secondary
#758C49
accent
#D553A8
background
#F6F5F8
surface
#ECE9EF
border
#C7C5CA
text
#07040B
muted
#7A797C

Preview Lab

Preview with #342158

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

Preview Lab → · Contrast checker → · Palette generator →

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