#340542#340542

#340542 is a very dark, moderate purple. Relative luminance 0.012; OKLCH L 24.6% C 0.110 H 316.7°. Best body text is #FFFFFF at 16.85:1 contrast (WCAG AA passes).

Color values

HEX#340542
RGBrgb(52, 5, 66)
HSLhsl(286, 86%, 14%)
HSVhsv(286, 92%, 26%)
CMYKcmyk(21.2%, 92.4%, 0%, 74.1%)
CIE-LABlab(10.79, 32.29, -26.66)
CIE-LCHlch(10.79, 41.87, 320.46°)
OKLaboklab(24.56% 0.0798 -0.0752)
OKLCHoklch(24.56% 0.11 316.7)
XYZxyz(2.4537, 1.2321, 5.2618)
Luminance0.0123 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340542 #134205
analogous
#160542 #340542 #420532
triadic
#340542 #423405 #054234
tetradic
#340542 #421605 #134205 #053242
square
#340542 #421605 #134205 #053242
split-complementary
#340542 #324205 #054216
monochromatic
#16021C #16021C #340542 #61097B #8E0EB4

Accessibility & contrast

On white

16.85
#340542 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.25
#340542 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #340542
16.85:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340542#FFFFFF#000000##FFFFFF
##3405421.0016.851.2516.85
#FFFFFF16.851.0021.001.00
#0000001.2521.001.0021.00
##FFFFFF16.851.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001A44
Deuteranopia (green-blind)
#051E41
Tritanopia (blue-blind)
#331424
Achromatopsia (no color)
#1D1D1D

Design tokens & code

CSS
--color: #340542;
/* rgb */ color: rgb(52, 5, 66);
/* oklch */ color: oklch(24.6% 0.110 316.7);
Tailwind
colors: {
  custom: {
    50: '#6e4c77',
    500: '#340542',
    950: '#000000',
  },
}
SCSS
$custom: #340542;
$custom-light: #6e4c77;
$custom-dark: #000000;
JSON
{
  "hex": "#340542",
  "rgb": {
    "r": 52,
    "g": 5,
    "b": 66
  },
  "hsl": {
    "h": 286.23,
    "s": 85.915,
    "l": 13.922
  },
  "oklch": {
    "l": 0.24556,
    "c": 0.10968,
    "h": 316.7
  },
  "luminance": 0.01232
}

Semantic roles & 50–950 ramp

primary
#340542
secondary
#378220
accent
#FC2C5C
background
#F6F4F7
surface
#ECE7ED
border
#C7C3C8
text
#070108
muted
#7A777B

Preview Lab

Preview with #340542

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

Preview Lab → · Contrast checker → · Palette generator →

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