#340D58#340D58

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

Color values

HEX#340D58
RGBrgb(52, 13, 88)
HSLhsl(271, 74%, 20%)
HSVhsv(271, 85%, 35%)
CMYKcmyk(40.9%, 85.2%, 0%, 65.5%)
CIE-LABlab(13.96, 34.33, -36.70)
CIE-LCHlch(13.96, 50.26, 313.09°)
OKLaboklab(27.39% 0.0657 -0.1048)
OKLCHoklch(27.39% 0.124 302.1)
XYZxyz(3.3211, 1.7225, 9.3881)
Luminance0.0172 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340D58 #31580D
analogous
#0F0D58 #340D58 #580D57
triadic
#340D58 #58340D #0D5834
tetradic
#340D58 #580F0D #31580D #0D5758
square
#340D58 #580F0D #31580D #0D5758
split-complementary
#340D58 #57580D #0D580F
monochromatic
#10041B #140523 #340D58 #54158D #731DC3

Accessibility & contrast

On white

15.62
#340D58 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #340D58
15.62:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340D58#FFFFFF#000000##FFFFFF
##340D581.0015.621.3415.62
#FFFFFF15.621.0021.001.00
#0000001.3421.001.0021.00
##FFFFFF15.621.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00235A
Deuteranopia (green-blind)
#002357
Tritanopia (blue-blind)
#2C2133
Achromatopsia (no color)
#242424

Design tokens & code

CSS
--color: #340d58;
/* rgb */ color: rgb(52, 13, 88);
/* oklch */ color: oklch(27.4% 0.124 302.1);
Tailwind
colors: {
  custom: {
    50: '#705188',
    500: '#340d58',
    950: '#000000',
  },
}
SCSS
$custom: #340d58;
$custom-light: #705188;
$custom-dark: #000000;
JSON
{
  "hex": "#340d58",
  "rgb": {
    "r": 52,
    "g": 13,
    "b": 88
  },
  "hsl": {
    "h": 271.2,
    "s": 74.257,
    "l": 19.804
  },
  "oklch": {
    "l": 0.27392,
    "c": 0.12372,
    "h": 302.1
  },
  "luminance": 0.01722
}

Semantic roles & 50–950 ramp

primary
#340D58
secondary
#5E932E
accent
#F13790
background
#F7F4F8
surface
#EDE7F0
border
#C8C3CB
text
#08020B
muted
#7B787C

Preview Lab

Preview with #340D58

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

Preview Lab → · Contrast checker → · Palette generator →

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