#340C40#340C40

#340C40 is a dark, moderate purple. Relative luminance 0.014; OKLCH L 25.2% C 0.098 H 317.2°. Best body text is #FFFFFF at 16.50:1 contrast (WCAG AA passes).

Color values

HEX#340C40
RGBrgb(52, 12, 64)
HSLhsl(286, 68%, 15%)
HSVhsv(286, 81%, 25%)
CMYKcmyk(18.8%, 81.2%, 0%, 74.9%)
CIE-LABlab(11.71, 28.71, -23.76)
CIE-LCHlch(11.71, 37.27, 320.40°)
OKLaboklab(25.15% 0.0722 -0.0668)
OKLCHoklch(25.15% 0.098 317.2)
XYZxyz(2.4729, 1.3633, 4.9824)
Luminance0.0136 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340C40 #18400C
analogous
#1A0C40 #340C40 #400C32
triadic
#340C40 #40340C #0C4034
tetradic
#340C40 #401A0C #18400C #0C3240
square
#340C40 #401A0C #18400C #0C3240
split-complementary
#340C40 #32400C #0C401A
monochromatic
#15051A #15051A #340C40 #5E1674 #881FA7

Accessibility & contrast

On white

16.50
#340C40 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #340C40
16.50:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340C40#FFFFFF#000000##FFFFFF
##340C401.0016.501.2716.50
#FFFFFF16.501.0021.001.00
#0000001.2721.001.0021.00
##FFFFFF16.501.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #340c40;
/* rgb */ color: rgb(52, 12, 64);
/* oklch */ color: oklch(25.2% 0.098 317.2);
Tailwind
colors: {
  custom: {
    50: '#6e4f75',
    500: '#340c40',
    950: '#000000',
  },
}
SCSS
$custom: #340c40;
$custom-light: #6e4f75;
$custom-dark: #000000;
JSON
{
  "hex": "#340c40",
  "rgb": {
    "r": 52,
    "g": 12,
    "b": 64
  },
  "hsl": {
    "h": 286.154,
    "s": 68.421,
    "l": 14.902
  },
  "oklch": {
    "l": 0.25153,
    "c": 0.09833,
    "h": 317.2
  },
  "luminance": 0.01363
}

Semantic roles & 50–950 ramp

primary
#340C40
secondary
#3E7C2C
accent
#EB3D65
background
#F6F4F7
surface
#ECE7ED
border
#C7C3C8
text
#070208
muted
#7A787B

Preview Lab

Preview with #340C40

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

Preview Lab → · Contrast checker → · Palette generator →

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