#340F5A#340F5A

#340F5A is a dark, vivid violet. Relative luminance 0.018; OKLCH L 27.8% C 0.124 H 300.7°. Best body text is #FFFFFF at 15.42:1 contrast (WCAG AA passes).

Color values

HEX#340F5A
RGBrgb(52, 15, 90)
HSLhsl(270, 71%, 21%)
HSVhsv(270, 83%, 35%)
CMYKcmyk(42.2%, 83.3%, 0%, 64.7%)
CIE-LABlab(14.46, 33.99, -37.24)
CIE-LCHlch(14.46, 50.42, 312.38°)
OKLaboklab(27.8% 0.0633 -0.1064)
OKLCHoklch(27.8% 0.124 300.7)
XYZxyz(3.4320, 1.8099, 9.8394)
Luminance0.0181 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340F5A #355A0F
analogous
#0F0F5A #340F5A #590F5A
triadic
#340F5A #5A340F #0F5A34
tetradic
#340F5A #5A0F0F #355A0F #0F5A59
square
#340F5A #5A0F0F #355A0F #0F5A59
split-complementary
#340F5A #5A590F #0F5A0F
monochromatic
#0F041A #160626 #340F5A #52188E #7120C3

Accessibility & contrast

On white

15.42
#340F5A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.36
#340F5A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #340F5A
15.42:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340F5A#FFFFFF#000000##FFFFFF
##340F5A1.0015.421.3615.42
#FFFFFF15.421.0021.001.00
#0000001.3621.001.0021.00
##FFFFFF15.421.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00245C
Deuteranopia (green-blind)
#002459
Tritanopia (blue-blind)
#2B2334
Achromatopsia (no color)
#252525

Design tokens & code

CSS
--color: #340f5a;
/* rgb */ color: rgb(52, 15, 90);
/* oklch */ color: oklch(27.8% 0.124 300.7);
Tailwind
colors: {
  custom: {
    50: '#705289',
    500: '#340f5a',
    950: '#000000',
  },
}
SCSS
$custom: #340f5a;
$custom-light: #705289;
$custom-dark: #000000;
JSON
{
  "hex": "#340f5a",
  "rgb": {
    "r": 52,
    "g": 15,
    "b": 90
  },
  "hsl": {
    "h": 269.6,
    "s": 71.429,
    "l": 20.588
  },
  "oklch": {
    "l": 0.27799,
    "c": 0.1238,
    "h": 300.7
  },
  "luminance": 0.0181
}

Semantic roles & 50–950 ramp

primary
#340F5A
secondary
#639431
accent
#EE3A95
background
#F7F4F8
surface
#EDE7F0
border
#C8C3CB
text
#08020C
muted
#7B787D

Preview Lab

Preview with #340F5A

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

Preview Lab → · Contrast checker → · Palette generator →

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