#340B40#340B40

#340B40 is a dark, moderate purple. Relative luminance 0.013; OKLCH L 25.0% C 0.100 H 317.4°. Best body text is #FFFFFF at 16.56:1 contrast (WCAG AA passes).

Color values

HEX#340B40
RGBrgb(52, 11, 64)
HSLhsl(286, 71%, 15%)
HSVhsv(286, 83%, 25%)
CMYKcmyk(18.8%, 82.8%, 0%, 74.9%)
CIE-LABlab(11.55, 29.17, -24.02)
CIE-LCHlch(11.55, 37.78, 320.54°)
OKLaboklab(25.04% 0.0734 -0.0675)
OKLCHoklch(25.04% 0.1 317.4)
XYZxyz(2.4611, 1.3397, 4.9784)
Luminance0.0134 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340B40 #17400B
analogous
#1A0B40 #340B40 #400B32
triadic
#340B40 #40340B #0B4034
tetradic
#340B40 #401A0B #17400B #0B3240
square
#340B40 #401A0B #17400B #0B3240
split-complementary
#340B40 #32400B #0B401A
monochromatic
#15041A #15041A #340B40 #5E1474 #891DA8

Accessibility & contrast

On white

16.56
#340B40 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.27
#340B40 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #340B40
16.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340B40#FFFFFF#000000##FFFFFF
##340B401.0016.561.2716.56
#FFFFFF16.561.0021.001.00
#0000001.2721.001.0021.00
##FFFFFF16.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001C41
Deuteranopia (green-blind)
#0C203F
Tritanopia (blue-blind)
#331624
Achromatopsia (no color)
#1F1F1F

Design tokens & code

CSS
--color: #340b40;
/* rgb */ color: rgb(52, 11, 64);
/* oklch */ color: oklch(25.0% 0.100 317.4);
Tailwind
colors: {
  custom: {
    50: '#6e4f75',
    500: '#340b40',
    950: '#000000',
  },
}
SCSS
$custom: #340b40;
$custom-light: #6e4f75;
$custom-dark: #000000;
JSON
{
  "hex": "#340b40",
  "rgb": {
    "r": 52,
    "g": 11,
    "b": 64
  },
  "hsl": {
    "h": 286.415,
    "s": 70.667,
    "l": 14.706
  },
  "oklch": {
    "l": 0.25039,
    "c": 0.09971,
    "h": 317.4
  },
  "luminance": 0.0134
}

Semantic roles & 50–950 ramp

primary
#340B40
secondary
#3D7D2A
accent
#ED3A63
background
#F6F4F7
surface
#ECE7ED
border
#C7C3C8
text
#070208
muted
#7A787B

Preview Lab

Preview with #340B40

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

Preview Lab → · Contrast checker → · Palette generator →

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