#340F5E#340F5E

#340F5E is a dark, vivid violet. Relative luminance 0.019; OKLCH L 28.2% C 0.128 H 298.9°. Best body text is #FFFFFF at 15.26:1 contrast (WCAG AA passes).

Color values

HEX#340F5E
RGBrgb(52, 15, 94)
HSLhsl(268, 72%, 21%)
HSVhsv(268, 84%, 37%)
CMYKcmyk(44.7%, 84%, 0%, 63.1%)
CIE-LABlab(14.84, 35.08, -39.29)
CIE-LCHlch(14.84, 52.67, 311.76°)
OKLaboklab(28.19% 0.062 -0.1124)
OKLCHoklch(28.19% 0.128 298.9)
XYZxyz(3.6069, 1.8798, 10.7603)
Luminance0.0188 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340F5E #395E0F
analogous
#0F125E #340F5E #5C0F5E
triadic
#340F5E #5E340F #0F5E34
tetradic
#340F5E #5E0F12 #395E0F #0F5E5C
square
#340F5E #5E0F12 #395E0F #0F5E5C
split-complementary
#340F5E #5E5C0F #125E0F
monochromatic
#0F041A #170729 #340F5E #511793 #6E20C8

Accessibility & contrast

On white

15.26
#340F5E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.38
#340F5E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #340F5E
15.26:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340F5E#FFFFFF#000000##FFFFFF
##340F5E1.0015.261.3815.26
#FFFFFF15.261.0021.001.00
#0000001.3821.001.0021.00
##FFFFFF15.261.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002560
Deuteranopia (green-blind)
#00255D
Tritanopia (blue-blind)
#2A2536
Achromatopsia (no color)
#252525

Design tokens & code

CSS
--color: #340f5e;
/* rgb */ color: rgb(52, 15, 94);
/* oklch */ color: oklch(28.2% 0.128 298.9);
Tailwind
colors: {
  custom: {
    50: '#71528c',
    500: '#340f5e',
    950: '#000000',
  },
}
SCSS
$custom: #340f5e;
$custom-light: #71528c;
$custom-dark: #000000;
JSON
{
  "hex": "#340f5e",
  "rgb": {
    "r": 52,
    "g": 15,
    "b": 94
  },
  "hsl": {
    "h": 268.101,
    "s": 72.477,
    "l": 21.373
  },
  "oklch": {
    "l": 0.28189,
    "c": 0.12838,
    "h": 298.9
  },
  "luminance": 0.0188
}

Semantic roles & 50–950 ramp

primary
#340F5E
secondary
#689731
accent
#EF399A
background
#F7F4F8
surface
#EDE7F0
border
#C8C3CB
text
#08020C
muted
#7B787D

Preview Lab

Preview with #340F5E

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

Preview Lab → · Contrast checker → · Palette generator →

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