#340E52#340E52

#340E52 is a dark, moderate violet. Relative luminance 0.017; OKLCH L 26.9% C 0.116 H 305.1°. Best body text is #FFFFFF at 15.78:1 contrast (WCAG AA passes).

Color values

HEX#340E52
RGBrgb(52, 14, 82)
HSLhsl(274, 71%, 19%)
HSVhsv(274, 83%, 32%)
CMYKcmyk(36.6%, 82.9%, 0%, 67.8%)
CIE-LABlab(13.55, 32.30, -33.29)
CIE-LCHlch(13.55, 46.39, 314.14°)
OKLaboklab(26.93% 0.0665 -0.0948)
OKLCHoklch(26.93% 0.116 305.1)
XYZxyz(3.0959, 1.6534, 8.1370)
Luminance0.0165 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340E52 #2C520E
analogous
#120E52 #340E52 #520E4E
triadic
#340E52 #52340E #0E5234
tetradic
#340E52 #52120E #2C520E #0E4E52
square
#340E52 #52120E #2C520E #0E4E52
split-complementary
#340E52 #4E520E #0E5212
monochromatic
#11041A #13051E #340E52 #551786 #7620BB

Accessibility & contrast

On white

15.78
#340E52 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.33
#340E52 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #340E52
15.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340E52#FFFFFF#000000##FFFFFF
##340E521.0015.781.3315.78
#FFFFFF15.781.0021.001.00
#0000001.3321.001.0021.00
##FFFFFF15.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002254
Deuteranopia (green-blind)
#002351
Tritanopia (blue-blind)
#2E1F2F
Achromatopsia (no color)
#232323

Design tokens & code

CSS
--color: #340e52;
/* rgb */ color: rgb(52, 14, 82);
/* oklch */ color: oklch(26.9% 0.116 305.1);
Tailwind
colors: {
  custom: {
    50: '#6f5183',
    500: '#340e52',
    950: '#000000',
  },
}
SCSS
$custom: #340e52;
$custom-light: #6f5183;
$custom-dark: #000000;
JSON
{
  "hex": "#340e52",
  "rgb": {
    "r": 52,
    "g": 14,
    "b": 82
  },
  "hsl": {
    "h": 273.529,
    "s": 70.833,
    "l": 18.824
  },
  "oklch": {
    "l": 0.26933,
    "c": 0.1158,
    "h": 305.1
  },
  "luminance": 0.01653
}

Semantic roles & 50–950 ramp

primary
#340E52
secondary
#588C2F
accent
#EE3A89
background
#F6F4F8
surface
#ECE7EF
border
#C7C3CA
text
#08020B
muted
#7B787C

Preview Lab

Preview with #340E52

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

Preview Lab → · Contrast checker → · Palette generator →

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