#340D57#340D57

#340D57 is a dark, vivid violet. Relative luminance 0.017; OKLCH L 27.3% C 0.123 H 302.6°. Best body text is #FFFFFF at 15.66:1 contrast (WCAG AA passes).

Color values

HEX#340D57
RGBrgb(52, 13, 87)
HSLhsl(272, 74%, 20%)
HSVhsv(272, 85%, 34%)
CMYKcmyk(40.2%, 85.1%, 0%, 65.9%)
CIE-LABlab(13.86, 34.07, -36.19)
CIE-LCHlch(13.86, 49.70, 313.28°)
OKLaboklab(27.3% 0.066 -0.1033)
OKLCHoklch(27.3% 0.123 302.6)
XYZxyz(3.2800, 1.7060, 9.1715)
Luminance0.0171 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340D57 #30570D
analogous
#0F0D57 #340D57 #570D55
triadic
#340D57 #57340D #0D5734
tetradic
#340D57 #570F0D #30570D #0D5557
square
#340D57 #570F0D #30570D #0D5557
split-complementary
#340D57 #55570D #0D570F
monochromatic
#10041B #140522 #340D57 #54158C #741DC1

Accessibility & contrast

On white

15.66
#340D57 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.34
#340D57 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #340D57
15.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340D57#FFFFFF#000000##FFFFFF
##340D571.0015.661.3415.66
#FFFFFF15.661.0021.001.00
#0000001.3421.001.0021.00
##FFFFFF15.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002359
Deuteranopia (green-blind)
#002356
Tritanopia (blue-blind)
#2D2132
Achromatopsia (no color)
#232323

Design tokens & code

CSS
--color: #340d57;
/* rgb */ color: rgb(52, 13, 87);
/* oklch */ color: oklch(27.3% 0.123 302.6);
Tailwind
colors: {
  custom: {
    50: '#705187',
    500: '#340d57',
    950: '#000000',
  },
}
SCSS
$custom: #340d57;
$custom-light: #705187;
$custom-dark: #000000;
JSON
{
  "hex": "#340d57",
  "rgb": {
    "r": 52,
    "g": 13,
    "b": 87
  },
  "hsl": {
    "h": 271.622,
    "s": 74,
    "l": 19.608
  },
  "oklch": {
    "l": 0.27295,
    "c": 0.12259,
    "h": 302.6
  },
  "luminance": 0.01706
}

Semantic roles & 50–950 ramp

primary
#340D57
secondary
#5D922E
accent
#F1378F
background
#F7F4F8
surface
#EDE7EF
border
#C8C3CA
text
#08020B
muted
#7B787C

Preview Lab

Preview with #340D57

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

Preview Lab → · Contrast checker → · Palette generator →

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