#340C4C#340C4C

#340C4C is a dark, moderate violet. Relative luminance 0.015; OKLCH L 26.2% C 0.111 H 308.9°. Best body text is #FFFFFF at 16.12:1 contrast (WCAG AA passes).

Color values

HEX#340C4C
RGBrgb(52, 12, 76)
HSLhsl(278, 73%, 17%)
HSVhsv(278, 84%, 30%)
CMYKcmyk(31.6%, 84.2%, 0%, 70.2%)
CIE-LABlab(12.70, 31.65, -30.55)
CIE-LCHlch(12.70, 43.99, 316.02°)
OKLaboklab(26.17% 0.0701 -0.0867)
OKLCHoklch(26.17% 0.111 308.9)
XYZxyz(2.8519, 1.5149, 6.9782)
Luminance0.0152 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340C4C #244C0C
analogous
#140C4C #340C4C #4C0C44
triadic
#340C4C #4C340C #0C4C34
tetradic
#340C4C #4C140C #244C0C #0C444C
square
#340C4C #4C140C #244C0C #0C444C
split-complementary
#340C4C #444C0C #0C4C14
monochromatic
#12041A #12041A #340C4C #581481 #7C1DB6

Accessibility & contrast

On white

16.12
#340C4C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.30
#340C4C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #340C4C
16.12:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340C4C#FFFFFF#000000##FFFFFF
##340C4C1.0016.121.3016.12
#FFFFFF16.121.0021.001.00
#0000001.3021.001.0021.00
##FFFFFF16.121.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001F4E
Deuteranopia (green-blind)
#00214B
Tritanopia (blue-blind)
#301C2B
Achromatopsia (no color)
#212121

Design tokens & code

CSS
--color: #340c4c;
/* rgb */ color: rgb(52, 12, 76);
/* oklch */ color: oklch(26.2% 0.111 308.9);
Tailwind
colors: {
  custom: {
    50: '#6f507f',
    500: '#340c4c',
    950: '#000000',
  },
}
SCSS
$custom: #340c4c;
$custom-light: #6f507f;
$custom-dark: #000000;
JSON
{
  "hex": "#340c4c",
  "rgb": {
    "r": 52,
    "g": 12,
    "b": 76
  },
  "hsl": {
    "h": 277.5,
    "s": 72.727,
    "l": 17.255
  },
  "oklch": {
    "l": 0.26169,
    "c": 0.11148,
    "h": 308.9
  },
  "luminance": 0.01515
}

Semantic roles & 50–950 ramp

primary
#340C4C
secondary
#4E882C
accent
#EF387D
background
#F6F4F7
surface
#ECE7EE
border
#C7C3C9
text
#07020A
muted
#7A787C

Preview Lab

Preview with #340C4C

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

Preview Lab → · Contrast checker → · Palette generator →

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