#340F5C#340F5C

#340F5C is a dark, vivid violet. Relative luminance 0.018; OKLCH L 28.0% C 0.126 H 299.8°. Best body text is #FFFFFF at 15.34:1 contrast (WCAG AA passes).

Color values

HEX#340F5C
RGBrgb(52, 15, 92)
HSLhsl(269, 72%, 21%)
HSVhsv(269, 84%, 36%)
CMYKcmyk(43.5%, 83.7%, 0%, 63.9%)
CIE-LABlab(14.65, 34.53, -38.27)
CIE-LCHlch(14.65, 51.54, 312.06°)
OKLaboklab(27.99% 0.0627 -0.1094)
OKLCHoklch(27.99% 0.126 299.8)
XYZxyz(3.5183, 1.8444, 10.2938)
Luminance0.0184 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340F5C #375C0F
analogous
#0F105C #340F5C #5A0F5C
triadic
#340F5C #5C340F #0F5C34
tetradic
#340F5C #5C0F10 #375C0F #0F5C5A
square
#340F5C #5C0F10 #375C0F #0F5C5A
split-complementary
#340F5C #5C5A0F #105C0F
monochromatic
#0F041A #160627 #340F5C #521891 #6F20C5

Accessibility & contrast

On white

15.34
#340F5C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #340F5C
15.34:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340F5C#FFFFFF#000000##FFFFFF
##340F5C1.0015.341.3715.34
#FFFFFF15.341.0021.001.00
#0000001.3721.001.0021.00
##FFFFFF15.341.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00255E
Deuteranopia (green-blind)
#00245B
Tritanopia (blue-blind)
#2A2435
Achromatopsia (no color)
#252525

Design tokens & code

CSS
--color: #340f5c;
/* rgb */ color: rgb(52, 15, 92);
/* oklch */ color: oklch(28.0% 0.126 299.8);
Tailwind
colors: {
  custom: {
    50: '#70528b',
    500: '#340f5c',
    950: '#000000',
  },
}
SCSS
$custom: #340f5c;
$custom-light: #70528b;
$custom-dark: #000000;
JSON
{
  "hex": "#340f5c",
  "rgb": {
    "r": 52,
    "g": 15,
    "b": 92
  },
  "hsl": {
    "h": 268.831,
    "s": 71.963,
    "l": 20.98
  },
  "oklch": {
    "l": 0.27993,
    "c": 0.12609,
    "h": 299.8
  },
  "luminance": 0.01844
}

Semantic roles & 50–950 ramp

primary
#340F5C
secondary
#659531
accent
#EF3997
background
#F7F4F8
surface
#EDE7F0
border
#C8C3CB
text
#08020C
muted
#7B787D

Preview Lab

Preview with #340F5C

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

Preview Lab → · Contrast checker → · Palette generator →

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