#340D54#340D54

#340D54 is a dark, moderate violet. Relative luminance 0.017; OKLCH L 27.0% C 0.119 H 304.2°. Best body text is #FFFFFF at 15.77:1 contrast (WCAG AA passes).

Color values

HEX#340D54
RGBrgb(52, 13, 84)
HSLhsl(273, 73%, 19%)
HSVhsv(273, 85%, 33%)
CMYKcmyk(38.1%, 84.5%, 0%, 67.1%)
CIE-LABlab(13.58, 33.28, -34.61)
CIE-LCHlch(13.58, 48.01, 313.88°)
OKLaboklab(27.01% 0.067 -0.0987)
OKLCHoklch(27.01% 0.119 304.2)
XYZxyz(3.1600, 1.6580, 8.5393)
Luminance0.0166 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340D54 #2D540D
analogous
#110D54 #340D54 #540D51
triadic
#340D54 #54340D #0D5434
tetradic
#340D54 #54110D #2D540D #0D5154
square
#340D54 #54110D #2D540D #0D5154
split-complementary
#340D54 #51540D #0D5411
monochromatic
#10041A #13051F #340D54 #551589 #761DBE

Accessibility & contrast

On white

15.77
#340D54 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #340D54
15.77:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340D54#FFFFFF#000000##FFFFFF
##340D541.0015.771.3315.77
#FFFFFF15.771.0021.001.00
#0000001.3321.001.0021.00
##FFFFFF15.771.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002256
Deuteranopia (green-blind)
#002353
Tritanopia (blue-blind)
#2E2030
Achromatopsia (no color)
#232323

Design tokens & code

CSS
--color: #340d54;
/* rgb */ color: rgb(52, 13, 84);
/* oklch */ color: oklch(27.0% 0.119 304.2);
Tailwind
colors: {
  custom: {
    50: '#6f5185',
    500: '#340d54',
    950: '#000000',
  },
}
SCSS
$custom: #340d54;
$custom-light: #6f5185;
$custom-dark: #000000;
JSON
{
  "hex": "#340d54",
  "rgb": {
    "r": 52,
    "g": 13,
    "b": 84
  },
  "hsl": {
    "h": 272.958,
    "s": 73.196,
    "l": 19.02
  },
  "oklch": {
    "l": 0.2701,
    "c": 0.11923,
    "h": 304.2
  },
  "luminance": 0.01658
}

Semantic roles & 50–950 ramp

primary
#340D54
secondary
#5A8F2E
accent
#F0388B
background
#F6F4F8
surface
#ECE7EF
border
#C7C3CA
text
#08020B
muted
#7B787C

Preview Lab

Preview with #340D54

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

Preview Lab → · Contrast checker → · Palette generator →

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