#340B56#340B56

#340B56 is a dark, vivid violet. Relative luminance 0.016; OKLCH L 27.0% C 0.124 H 303.5°. Best body text is #FFFFFF at 15.81:1 contrast (WCAG AA passes).

Color values

HEX#340B56
RGBrgb(52, 11, 86)
HSLhsl(273, 77%, 19%)
HSVhsv(273, 87%, 34%)
CMYKcmyk(39.5%, 87.2%, 0%, 66.3%)
CIE-LABlab(13.48, 34.64, -36.13)
CIE-LCHlch(13.48, 50.05, 313.79°)
OKLaboklab(27% 0.0681 -0.1031)
OKLCHoklch(27% 0.124 303.5)
XYZxyz(3.2152, 1.6413, 8.9497)
Luminance0.0164 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340B56 #2D560B
analogous
#0F0B56 #340B56 #560B53
triadic
#340B56 #56340B #0B5634
tetradic
#340B56 #560F0B #2D560B #0B5356
square
#340B56 #560F0B #2D560B #0B5356
split-complementary
#340B56 #53560B #0B560F
monochromatic
#10031B #130420 #340B56 #55128C #7619C3

Accessibility & contrast

On white

15.81
#340B56 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.33
#340B56 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #340B56
15.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340B56#FFFFFF#000000##FFFFFF
##340B561.0015.811.3315.81
#FFFFFF15.811.0021.001.00
#0000001.3321.001.0021.00
##FFFFFF15.811.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002258
Deuteranopia (green-blind)
#002255
Tritanopia (blue-blind)
#2D2031
Achromatopsia (no color)
#232323

Design tokens & code

CSS
--color: #340b56;
/* rgb */ color: rgb(52, 11, 86);
/* oklch */ color: oklch(27.0% 0.124 303.5);
Tailwind
colors: {
  custom: {
    50: '#705086',
    500: '#340b56',
    950: '#000000',
  },
}
SCSS
$custom: #340b56;
$custom-light: #705086;
$custom-dark: #000000;
JSON
{
  "hex": "#340b56",
  "rgb": {
    "r": 52,
    "g": 11,
    "b": 86
  },
  "hsl": {
    "h": 272.8,
    "s": 77.32,
    "l": 19.02
  },
  "oklch": {
    "l": 0.26999,
    "c": 0.12358,
    "h": 303.5
  },
  "luminance": 0.01641
}

Semantic roles & 50–950 ramp

primary
#340B56
secondary
#5A912B
accent
#F4348B
background
#F7F4F8
surface
#EDE7EF
border
#C8C3CA
text
#08020B
muted
#7B787C

Preview Lab

Preview with #340B56

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

Preview Lab → · Contrast checker → · Palette generator →

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