#340F4A#340F4A

#340F4A is a dark, moderate violet. Relative luminance 0.016; OKLCH L 26.3% C 0.105 H 309.6°. Best body text is #FFFFFF at 15.99:1 contrast (WCAG AA passes).

Color values

HEX#340F4A
RGBrgb(52, 15, 74)
HSLhsl(278, 66%, 17%)
HSVhsv(278, 80%, 29%)
CMYKcmyk(29.7%, 79.7%, 0%, 71%)
CIE-LABlab(13.02, 29.74, -28.65)
CIE-LCHlch(13.02, 41.29, 316.07°)
OKLaboklab(26.34% 0.0672 -0.0811)
OKLCHoklch(26.34% 0.105 309.6)
XYZxyz(2.8228, 1.5662, 6.6308)
Luminance0.0157 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340F4A #254A0F
analogous
#160F4A #340F4A #4A0F43
triadic
#340F4A #4A340F #0F4A34
tetradic
#340F4A #4A160F #254A0F #0F434A
square
#340F4A #4A160F #254A0F #0F434A
split-complementary
#340F4A #434A0F #0F4A16
monochromatic
#120519 #120519 #340F4A #58197D #7C24B0

Accessibility & contrast

On white

15.99
#340F4A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.31
#340F4A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #340F4A
15.99:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340F4A#FFFFFF#000000##FFFFFF
##340F4A1.0015.991.3115.99
#FFFFFF15.991.0021.001.00
#0000001.3121.001.0021.00
##FFFFFF15.991.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00204C
Deuteranopia (green-blind)
#042249
Tritanopia (blue-blind)
#311C2B
Achromatopsia (no color)
#222222

Design tokens & code

CSS
--color: #340f4a;
/* rgb */ color: rgb(52, 15, 74);
/* oklch */ color: oklch(26.3% 0.105 309.6);
Tailwind
colors: {
  custom: {
    50: '#6e517d',
    500: '#340f4a',
    950: '#000000',
  },
}
SCSS
$custom: #340f4a;
$custom-light: #6e517d;
$custom-dark: #000000;
JSON
{
  "hex": "#340f4a",
  "rgb": {
    "r": 52,
    "g": 15,
    "b": 74
  },
  "hsl": {
    "h": 277.627,
    "s": 66.292,
    "l": 17.451
  },
  "oklch": {
    "l": 0.26341,
    "c": 0.10535,
    "h": 309.6
  },
  "luminance": 0.01566
}

Semantic roles & 50–950 ramp

primary
#340F4A
secondary
#508430
accent
#E93F7E
background
#F6F4F7
surface
#ECE7EE
border
#C7C3C9
text
#070209
muted
#7A787B

Preview Lab

Preview with #340F4A

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

Preview Lab → · Contrast checker → · Palette generator →

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