#340F57#340F57

#340F57 is a dark, vivid violet. Relative luminance 0.018; OKLCH L 27.5% C 0.120 H 302.2°. Best body text is #FFFFFF at 15.53:1 contrast (WCAG AA passes).

Color values

HEX#340F57
RGBrgb(52, 15, 87)
HSLhsl(271, 71%, 20%)
HSVhsv(271, 83%, 34%)
CMYKcmyk(40.2%, 82.8%, 0%, 65.9%)
CIE-LABlab(14.17, 33.17, -35.68)
CIE-LCHlch(14.17, 48.72, 312.92°)
OKLaboklab(27.51% 0.0642 -0.1018)
OKLCHoklch(27.51% 0.12 302.2)
XYZxyz(3.3069, 1.7598, 9.1804)
Luminance0.0176 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340F57 #32570F
analogous
#100F57 #340F57 #570F56
triadic
#340F57 #57340F #0F5734
tetradic
#340F57 #57100F #32570F #0F5657
square
#340F57 #57100F #32570F #0F5657
split-complementary
#340F57 #56570F #0F5710
monochromatic
#10051A #150623 #340F57 #53188B #7221BF

Accessibility & contrast

On white

15.53
#340F57 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.35
#340F57 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #340F57
15.53:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340F57#FFFFFF#000000##FFFFFF
##340F571.0015.531.3515.53
#FFFFFF15.531.0021.001.00
#0000001.3521.001.0021.00
##FFFFFF15.531.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002359
Deuteranopia (green-blind)
#002456
Tritanopia (blue-blind)
#2C2232
Achromatopsia (no color)
#242424

Design tokens & code

CSS
--color: #340f57;
/* rgb */ color: rgb(52, 15, 87);
/* oklch */ color: oklch(27.5% 0.120 302.2);
Tailwind
colors: {
  custom: {
    50: '#705287',
    500: '#340f57',
    950: '#000000',
  },
}
SCSS
$custom: #340f57;
$custom-light: #705287;
$custom-dark: #000000;
JSON
{
  "hex": "#340f57",
  "rgb": {
    "r": 52,
    "g": 15,
    "b": 87
  },
  "hsl": {
    "h": 270.833,
    "s": 70.588,
    "l": 20
  },
  "oklch": {
    "l": 0.27513,
    "c": 0.12034,
    "h": 302.2
  },
  "luminance": 0.0176
}

Semantic roles & 50–950 ramp

primary
#340F57
secondary
#609131
accent
#ED3A91
background
#F7F4F8
surface
#EDE7EF
border
#C8C3CA
text
#08020B
muted
#7B787C

Preview Lab

Preview with #340F57

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

Preview Lab → · Contrast checker → · Palette generator →

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