#340E56#340E56

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

Color values

HEX#340E56
RGBrgb(52, 14, 86)
HSLhsl(272, 72%, 20%)
HSVhsv(272, 84%, 34%)
CMYKcmyk(39.5%, 83.7%, 0%, 66.3%)
CIE-LABlab(13.92, 33.36, -35.41)
CIE-LCHlch(13.92, 48.65, 313.29°)
OKLaboklab(27.31% 0.0654 -0.101)
OKLCHoklch(27.31% 0.12 302.9)
XYZxyz(3.2525, 1.7160, 8.9622)
Luminance0.0172 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340E56 #30560E
analogous
#100E56 #340E56 #560E54
triadic
#340E56 #56340E #0E5634
tetradic
#340E56 #56100E #30560E #0E5456
square
#340E56 #56100E #30560E #0E5456
split-complementary
#340E56 #54560E #0E5610
monochromatic
#10041A #140521 #340E56 #54178B #741FBF

Accessibility & contrast

On white

15.63
#340E56 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #340E56
15.63:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340E56#FFFFFF#000000##FFFFFF
##340E561.0015.631.3415.63
#FFFFFF15.631.0021.001.00
#0000001.3421.001.0021.00
##FFFFFF15.631.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #340e56;
/* rgb */ color: rgb(52, 14, 86);
/* oklch */ color: oklch(27.3% 0.120 302.9);
Tailwind
colors: {
  custom: {
    50: '#705186',
    500: '#340e56',
    950: '#000000',
  },
}
SCSS
$custom: #340e56;
$custom-light: #705186;
$custom-dark: #000000;
JSON
{
  "hex": "#340e56",
  "rgb": {
    "r": 52,
    "g": 14,
    "b": 86
  },
  "hsl": {
    "h": 271.667,
    "s": 72,
    "l": 19.608
  },
  "oklch": {
    "l": 0.27307,
    "c": 0.12035,
    "h": 302.9
  },
  "luminance": 0.01716
}

Semantic roles & 50–950 ramp

primary
#340E56
secondary
#5D9030
accent
#EF398F
background
#F7F4F8
surface
#EDE7EF
border
#C8C3CA
text
#08020B
muted
#7B787C

Preview Lab

Preview with #340E56

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

Preview Lab → · Contrast checker → · Palette generator →

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