#340C42#340C42

#340C42 is a dark, moderate purple. Relative luminance 0.014; OKLCH L 25.3% C 0.101 H 315.7°. Best body text is #FFFFFF at 16.44:1 contrast (WCAG AA passes).

Color values

HEX#340C42
RGBrgb(52, 12, 66)
HSLhsl(284, 69%, 15%)
HSVhsv(284, 82%, 26%)
CMYKcmyk(21.2%, 81.8%, 0%, 74.1%)
CIE-LABlab(11.87, 29.19, -24.92)
CIE-LCHlch(11.87, 38.38, 319.51°)
OKLaboklab(25.31% 0.072 -0.0702)
OKLCHoklch(25.31% 0.101 315.7)
XYZxyz(2.5309, 1.3865, 5.2875)
Luminance0.0139 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340C42 #1A420C
analogous
#190C42 #340C42 #420C35
triadic
#340C42 #42340C #0C4234
tetradic
#340C42 #42190C #1A420C #0C3542
square
#340C42 #42190C #1A420C #0C3542
split-complementary
#340C42 #35420C #0C4219
monochromatic
#14051A #14051A #340C42 #5D1576 #861FAA

Accessibility & contrast

On white

16.44
#340C42 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.28
#340C42 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #340C42
16.44:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340C42#FFFFFF#000000##FFFFFF
##340C421.0016.441.2816.44
#FFFFFF16.441.0021.001.00
#0000001.2821.001.0021.00
##FFFFFF16.441.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001D44
Deuteranopia (green-blind)
#0B2041
Tritanopia (blue-blind)
#331726
Achromatopsia (no color)
#1F1F1F

Design tokens & code

CSS
--color: #340c42;
/* rgb */ color: rgb(52, 12, 66);
/* oklch */ color: oklch(25.3% 0.101 315.7);
Tailwind
colors: {
  custom: {
    50: '#6e4f77',
    500: '#340c42',
    950: '#000000',
  },
}
SCSS
$custom: #340c42;
$custom-light: #6e4f77;
$custom-dark: #000000;
JSON
{
  "hex": "#340c42",
  "rgb": {
    "r": 52,
    "g": 12,
    "b": 66
  },
  "hsl": {
    "h": 284.444,
    "s": 69.231,
    "l": 15.294
  },
  "oklch": {
    "l": 0.25314,
    "c": 0.10051,
    "h": 315.7
  },
  "luminance": 0.01386
}

Semantic roles & 50–950 ramp

primary
#340C42
secondary
#417E2C
accent
#EC3C69
background
#F6F4F7
surface
#ECE7ED
border
#C7C3C8
text
#070208
muted
#7A787B

Preview Lab

Preview with #340C42

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

Preview Lab → · Contrast checker → · Palette generator →

#340C42 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva