#340C57#340C57

#340C57 is a dark, vivid violet. Relative luminance 0.017; OKLCH L 27.2% C 0.124 H 302.8°. Best body text is #FFFFFF at 15.72:1 contrast (WCAG AA passes).

Color values

HEX#340C57
RGBrgb(52, 12, 87)
HSLhsl(272, 76%, 19%)
HSVhsv(272, 86%, 34%)
CMYKcmyk(40.2%, 86.2%, 0%, 65.9%)
CIE-LABlab(13.72, 34.49, -36.42)
CIE-LCHlch(13.72, 50.16, 313.44°)
OKLaboklab(27.19% 0.0669 -0.104)
OKLCHoklch(27.19% 0.124 302.8)
XYZxyz(3.2675, 1.6811, 9.1673)
Luminance0.0168 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340C57 #2F570C
analogous
#0E0C57 #340C57 #570C55
triadic
#340C57 #57340C #0C5734
tetradic
#340C57 #570E0C #2F570C #0C5557
square
#340C57 #570E0C #2F570C #0C5557
split-complementary
#340C57 #55570C #0C570E
monochromatic
#10041B #140521 #340C57 #54138D #741BC3

Accessibility & contrast

On white

15.72
#340C57 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #340C57
15.72:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340C57#FFFFFF#000000##FFFFFF
##340C571.0015.721.3415.72
#FFFFFF15.721.0021.001.00
#0000001.3421.001.0021.00
##FFFFFF15.721.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #340c57;
/* rgb */ color: rgb(52, 12, 87);
/* oklch */ color: oklch(27.2% 0.124 302.8);
Tailwind
colors: {
  custom: {
    50: '#705187',
    500: '#340c57',
    950: '#000000',
  },
}
SCSS
$custom: #340c57;
$custom-light: #705187;
$custom-dark: #000000;
JSON
{
  "hex": "#340c57",
  "rgb": {
    "r": 52,
    "g": 12,
    "b": 87
  },
  "hsl": {
    "h": 272,
    "s": 75.758,
    "l": 19.412
  },
  "oklch": {
    "l": 0.27194,
    "c": 0.12365,
    "h": 302.8
  },
  "luminance": 0.01681
}

Semantic roles & 50–950 ramp

primary
#340C57
secondary
#5C922D
accent
#F2358E
background
#F7F4F8
surface
#EDE7EF
border
#C8C3CA
text
#08020B
muted
#7B787C

Preview Lab

Preview with #340C57

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

Preview Lab → · Contrast checker → · Palette generator →

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