#340F5D#340F5D

#340F5D is a dark, vivid violet. Relative luminance 0.019; OKLCH L 28.1% C 0.127 H 299.3°. Best body text is #FFFFFF at 15.30:1 contrast (WCAG AA passes).

Color values

HEX#340F5D
RGBrgb(52, 15, 93)
HSLhsl(268, 72%, 21%)
HSVhsv(268, 84%, 36%)
CMYKcmyk(44.1%, 83.9%, 0%, 63.5%)
CIE-LABlab(14.75, 34.80, -38.78)
CIE-LCHlch(14.75, 52.11, 311.91°)
OKLaboklab(28.09% 0.0624 -0.1109)
OKLCHoklch(28.09% 0.127 299.3)
XYZxyz(3.5623, 1.8620, 10.5255)
Luminance0.0186 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340F5D #385D0F
analogous
#0F115D #340F5D #5B0F5D
triadic
#340F5D #5D340F #0F5D34
tetradic
#340F5D #5D0F11 #385D0F #0F5D5B
square
#340F5D #5D0F11 #385D0F #0F5D5B
split-complementary
#340F5D #5D5B0F #115D0F
monochromatic
#0F041A #170628 #340F5D #511792 #6F20C6

Accessibility & contrast

On white

15.30
#340F5D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.37
#340F5D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #340F5D
15.30:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340F5D#FFFFFF#000000##FFFFFF
##340F5D1.0015.301.3715.30
#FFFFFF15.301.0021.001.00
#0000001.3721.001.0021.00
##FFFFFF15.301.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00255F
Deuteranopia (green-blind)
#00245C
Tritanopia (blue-blind)
#2A2436
Achromatopsia (no color)
#252525

Design tokens & code

CSS
--color: #340f5d;
/* rgb */ color: rgb(52, 15, 93);
/* oklch */ color: oklch(28.1% 0.127 299.3);
Tailwind
colors: {
  custom: {
    50: '#70528c',
    500: '#340f5d',
    950: '#000000',
  },
}
SCSS
$custom: #340f5d;
$custom-light: #70528c;
$custom-dark: #000000;
JSON
{
  "hex": "#340f5d",
  "rgb": {
    "r": 52,
    "g": 15,
    "b": 93
  },
  "hsl": {
    "h": 268.462,
    "s": 72.222,
    "l": 21.176
  },
  "oklch": {
    "l": 0.2809,
    "c": 0.12724,
    "h": 299.3
  },
  "luminance": 0.01862
}

Semantic roles & 50–950 ramp

primary
#340F5D
secondary
#669631
accent
#EF3999
background
#F7F4F8
surface
#EDE7F0
border
#C8C3CB
text
#08020C
muted
#7B787D

Preview Lab

Preview with #340F5D

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

Preview Lab → · Contrast checker → · Palette generator →

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