#340840#340840

#340840 is a very dark, moderate purple. Relative luminance 0.013; OKLCH L 24.7% C 0.104 H 317.8°. Best body text is #FFFFFF at 16.74:1 contrast (WCAG AA passes).

Color values

HEX#340840
RGBrgb(52, 8, 64)
HSLhsl(287, 78%, 14%)
HSVhsv(287, 88%, 25%)
CMYKcmyk(18.8%, 87.5%, 0%, 74.9%)
CIE-LABlab(11.09, 30.48, -24.75)
CIE-LCHlch(11.09, 39.27, 320.92°)
OKLaboklab(24.71% 0.0768 -0.0697)
OKLCHoklch(24.71% 0.104 317.8)
XYZxyz(2.4283, 1.2740, 4.9675)
Luminance0.0127 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340840 #144008
analogous
#180840 #340840 #400830
triadic
#340840 #403408 #084034
tetradic
#340840 #401808 #144008 #083040
square
#340840 #401808 #144008 #083040
split-complementary
#340840 #304008 #084018
monochromatic
#16031B #16031B #340840 #600F76 #8C16AD

Accessibility & contrast

On white

16.74
#340840 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #340840
16.74:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340840#FFFFFF#000000##FFFFFF
##3408401.0016.741.2516.74
#FFFFFF16.741.0021.001.00
#0000001.2521.001.0021.00
##FFFFFF16.741.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001B42
Deuteranopia (green-blind)
#0A1F3F
Tritanopia (blue-blind)
#341424
Achromatopsia (no color)
#1E1E1E

Design tokens & code

CSS
--color: #340840;
/* rgb */ color: rgb(52, 8, 64);
/* oklch */ color: oklch(24.7% 0.104 317.8);
Tailwind
colors: {
  custom: {
    50: '#6e4d75',
    500: '#340840',
    950: '#000000',
  },
}
SCSS
$custom: #340840;
$custom-light: #6e4d75;
$custom-dark: #000000;
JSON
{
  "hex": "#340840",
  "rgb": {
    "r": 52,
    "g": 8,
    "b": 64
  },
  "hsl": {
    "h": 287.143,
    "s": 77.778,
    "l": 14.118
  },
  "oklch": {
    "l": 0.24714,
    "c": 0.10366,
    "h": 317.8
  },
  "luminance": 0.01274
}

Semantic roles & 50–950 ramp

primary
#340840
secondary
#387E25
accent
#F4345D
background
#F6F4F7
surface
#ECE7ED
border
#C7C3C8
text
#070208
muted
#7A787B

Preview Lab

Preview with #340840

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

Preview Lab → · Contrast checker → · Palette generator →

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