#340B4B#340B4B

#340B4B is a dark, moderate violet. Relative luminance 0.015; OKLCH L 26.0% C 0.112 H 309.7°. Best body text is #FFFFFF at 16.21:1 contrast (WCAG AA passes).

Color values

HEX#340B4B
RGBrgb(52, 11, 75)
HSLhsl(278, 74%, 17%)
HSVhsv(278, 85%, 29%)
CMYKcmyk(30.7%, 85.3%, 0%, 70.6%)
CIE-LABlab(12.46, 31.83, -30.24)
CIE-LCHlch(12.46, 43.91, 316.47°)
OKLaboklab(25.97% 0.0713 -0.0858)
OKLCHoklch(25.97% 0.112 309.7)
XYZxyz(2.8056, 1.4775, 6.7926)
Luminance0.0148 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340B4B #224B0B
analogous
#140B4B #340B4B #4B0B42
triadic
#340B4B #4B340B #0B4B34
tetradic
#340B4B #4B140B #224B0B #0B424B
square
#340B4B #4B140B #224B0B #0B424B
split-complementary
#340B4B #424B0B #0B4B14
monochromatic
#13041B #13041B #340B4B #591380 #7E1BB6

Accessibility & contrast

On white

16.21
#340B4B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #340B4B
16.21:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340B4B#FFFFFF#000000##FFFFFF
##340B4B1.0016.211.3016.21
#FFFFFF16.211.0021.001.00
#0000001.3021.001.0021.00
##FFFFFF16.211.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001F4D
Deuteranopia (green-blind)
#00214A
Tritanopia (blue-blind)
#311B2B
Achromatopsia (no color)
#202020

Design tokens & code

CSS
--color: #340b4b;
/* rgb */ color: rgb(52, 11, 75);
/* oklch */ color: oklch(26.0% 0.112 309.7);
Tailwind
colors: {
  custom: {
    50: '#6f4f7e',
    500: '#340b4b',
    950: '#000000',
  },
}
SCSS
$custom: #340b4b;
$custom-light: #6f4f7e;
$custom-dark: #000000;
JSON
{
  "hex": "#340b4b",
  "rgb": {
    "r": 52,
    "g": 11,
    "b": 75
  },
  "hsl": {
    "h": 278.438,
    "s": 74.419,
    "l": 16.863
  },
  "oklch": {
    "l": 0.25974,
    "c": 0.11158,
    "h": 309.7
  },
  "luminance": 0.01477
}

Semantic roles & 50–950 ramp

primary
#340B4B
secondary
#4C872B
accent
#F1377A
background
#F6F4F7
surface
#ECE7EE
border
#C7C3C9
text
#07020A
muted
#7A787C

Preview Lab

Preview with #340B4B

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

Preview Lab → · Contrast checker → · Palette generator →

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