#340F52#340F52

#340F52 is a dark, moderate violet. Relative luminance 0.017; OKLCH L 27.0% C 0.115 H 304.9°. Best body text is #FFFFFF at 15.72:1 contrast (WCAG AA passes).

Color values

HEX#340F52
RGBrgb(52, 15, 82)
HSLhsl(273, 69%, 19%)
HSVhsv(273, 82%, 32%)
CMYKcmyk(36.6%, 81.7%, 0%, 67.8%)
CIE-LABlab(13.71, 31.84, -33.03)
CIE-LCHlch(13.71, 45.87, 313.95°)
OKLaboklab(27.05% 0.0655 -0.094)
OKLCHoklch(27.05% 0.115 304.9)
XYZxyz(3.1096, 1.6809, 8.1416)
Luminance0.0168 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340F52 #2D520F
analogous
#130F52 #340F52 #520F4F
triadic
#340F52 #52340F #0F5234
tetradic
#340F52 #52130F #2D520F #0F4F52
square
#340F52 #52130F #2D520F #0F4F52
split-complementary
#340F52 #4F520F #0F5213
monochromatic
#10051A #13061E #340F52 #551886 #7622B9

Accessibility & contrast

On white

15.72
#340F52 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.34
#340F52 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #340F52
15.72:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340F52#FFFFFF#000000##FFFFFF
##340F521.0015.721.3415.72
#FFFFFF15.721.0021.001.00
#0000001.3421.001.0021.00
##FFFFFF15.721.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002254
Deuteranopia (green-blind)
#002351
Tritanopia (blue-blind)
#2E2030
Achromatopsia (no color)
#232323

Design tokens & code

CSS
--color: #340f52;
/* rgb */ color: rgb(52, 15, 82);
/* oklch */ color: oklch(27.0% 0.115 304.9);
Tailwind
colors: {
  custom: {
    50: '#6f5283',
    500: '#340f52',
    950: '#000000',
  },
}
SCSS
$custom: #340f52;
$custom-light: #6f5283;
$custom-dark: #000000;
JSON
{
  "hex": "#340f52",
  "rgb": {
    "r": 52,
    "g": 15,
    "b": 82
  },
  "hsl": {
    "h": 273.134,
    "s": 69.072,
    "l": 19.02
  },
  "oklch": {
    "l": 0.27048,
    "c": 0.11457,
    "h": 304.9
  },
  "luminance": 0.01681
}

Semantic roles & 50–950 ramp

primary
#340F52
secondary
#5A8C31
accent
#EC3C8B
background
#F6F4F8
surface
#ECE7EF
border
#C7C3CA
text
#08020B
muted
#7B787C

Preview Lab

Preview with #340F52

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

Preview Lab → · Contrast checker → · Palette generator →

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