#342040#342040

#342040 is a dark, moderate violet. Relative luminance 0.021; OKLCH L 28.4% C 0.062 H 311.8°. Best body text is #FFFFFF at 14.72:1 contrast (WCAG AA passes).

Color values

HEX#342040
RGBrgb(52, 32, 64)
HSLhsl(278, 33%, 19%)
HSVhsv(278, 50%, 25%)
CMYKcmyk(18.8%, 50%, 0%, 74.9%)
CIE-LABlab(16.17, 16.81, -16.68)
CIE-LCHlch(16.17, 23.68, 315.23°)
OKLaboklab(28.42% 0.0413 -0.0463)
OKLCHoklch(28.42% 0.062 311.8)
XYZxyz(2.8579, 2.1333, 5.1107)
Luminance0.0213 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#342040 #2C4020
analogous
#242040 #342040 #40203C
triadic
#342040 #403420 #204034
tetradic
#342040 #402420 #2C4020 #203C40
square
#342040 #402420 #2C4020 #203C40
split-complementary
#342040 #3C4020 #204024
monochromatic
#110A14 #130C17 #342040 #553469 #764992

Accessibility & contrast

On white

14.72
#342040 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.43
#342040 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #342040
14.72:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##342040#FFFFFF#000000##FFFFFF
##3420401.0014.721.4314.72
#FFFFFF14.721.0021.001.00
#0000001.4321.001.0021.00
##FFFFFF14.721.0021.001.00

Color blindness preview

Protanopia (red-blind)
#192741
Deuteranopia (green-blind)
#1F293F
Tritanopia (blue-blind)
#33252D
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #342040;
/* rgb */ color: rgb(52, 32, 64);
/* oklch */ color: oklch(28.4% 0.062 311.8);
Tailwind
colors: {
  custom: {
    50: '#6c5c75',
    500: '#342040',
    950: '#000000',
  },
}
SCSS
$custom: #342040;
$custom-light: #6c5c75;
$custom-dark: #000000;
JSON
{
  "hex": "#342040",
  "rgb": {
    "r": 52,
    "g": 32,
    "b": 64
  },
  "hsl": {
    "h": 277.5,
    "s": 33.333,
    "l": 18.824
  },
  "oklch": {
    "l": 0.2842,
    "c": 0.06206,
    "h": 311.8
  },
  "luminance": 0.02133
}

Semantic roles & 50–950 ramp

primary
#342040
secondary
#587448
accent
#C95E87
background
#F6F5F7
surface
#EBE9ED
border
#C6C5C8
text
#070408
muted
#7A797B

Preview Lab

Preview with #342040

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

Preview Lab → · Contrast checker → · Palette generator →

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