#340B4D#340B4D

#340B4D is a dark, moderate violet. Relative luminance 0.015; OKLCH L 26.2% C 0.114 H 308.5°. Best body text is #FFFFFF at 16.14:1 contrast (WCAG AA passes).

Color values

HEX#340B4D
RGBrgb(52, 11, 77)
HSLhsl(277, 75%, 17%)
HSVhsv(277, 86%, 30%)
CMYKcmyk(32.5%, 85.7%, 0%, 69.8%)
CIE-LABlab(12.64, 32.34, -31.34)
CIE-LCHlch(12.64, 45.03, 315.90°)
OKLaboklab(26.15% 0.0708 -0.089)
OKLCHoklch(26.15% 0.114 308.5)
XYZxyz(2.8751, 1.5053, 7.1588)
Luminance0.0150 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340B4D #244D0B
analogous
#130B4D #340B4D #4D0B45
triadic
#340B4D #4D340B #0B4D34
tetradic
#340B4D #4D130B #244D0B #0B454D
square
#340B4D #4D130B #244D0B #0B454D
split-complementary
#340B4D #454D0B #0B4D13
monochromatic
#12041B #12041B #340B4D #581383 #7C1AB8

Accessibility & contrast

On white

16.14
#340B4D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.30
#340B4D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #340B4D
16.14:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340B4D#FFFFFF#000000##FFFFFF
##340B4D1.0016.141.3016.14
#FFFFFF16.141.0021.001.00
#0000001.3021.001.0021.00
##FFFFFF16.141.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001F4F
Deuteranopia (green-blind)
#00214C
Tritanopia (blue-blind)
#301C2C
Achromatopsia (no color)
#212121

Design tokens & code

CSS
--color: #340b4d;
/* rgb */ color: rgb(52, 11, 77);
/* oklch */ color: oklch(26.2% 0.114 308.5);
Tailwind
colors: {
  custom: {
    50: '#6f4f7f',
    500: '#340b4d',
    950: '#000000',
  },
}
SCSS
$custom: #340b4d;
$custom-light: #6f4f7f;
$custom-dark: #000000;
JSON
{
  "hex": "#340b4d",
  "rgb": {
    "r": 52,
    "g": 11,
    "b": 77
  },
  "hsl": {
    "h": 277.273,
    "s": 75,
    "l": 17.255
  },
  "oklch": {
    "l": 0.26154,
    "c": 0.11376,
    "h": 308.5
  },
  "luminance": 0.01505
}

Semantic roles & 50–950 ramp

primary
#340B4D
secondary
#4E892B
accent
#F2367D
background
#F6F4F7
surface
#ECE7EE
border
#C7C3C9
text
#08020A
muted
#7B787C

Preview Lab

Preview with #340B4D

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

Preview Lab → · Contrast checker → · Palette generator →

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