#340C51#340C51

#340C51 is a dark, moderate violet. Relative luminance 0.016; OKLCH L 26.6% C 0.117 H 306.0°. Best body text is #FFFFFF at 15.94:1 contrast (WCAG AA passes).

Color values

HEX#340C51
RGBrgb(52, 12, 81)
HSLhsl(275, 74%, 18%)
HSVhsv(275, 85%, 32%)
CMYKcmyk(35.8%, 85.2%, 0%, 68.2%)
CIE-LABlab(13.15, 32.93, -33.26)
CIE-LCHlch(13.15, 46.80, 314.72°)
OKLaboklab(26.62% 0.0688 -0.0947)
OKLCHoklch(26.62% 0.117 306)
XYZxyz(3.0325, 1.5871, 7.9296)
Luminance0.0159 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340C51 #29510C
analogous
#110C51 #340C51 #510C4B
triadic
#340C51 #51340C #0C5134
tetradic
#340C51 #51110C #29510C #0C4B51
square
#340C51 #51110C #29510C #0C4B51
split-complementary
#340C51 #4B510C #0C5111
monochromatic
#11041B #12041C #340C51 #561486 #781CBC

Accessibility & contrast

On white

15.94
#340C51 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.32
#340C51 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #340C51
15.94:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340C51#FFFFFF#000000##FFFFFF
##340C511.0015.941.3215.94
#FFFFFF15.941.0021.001.00
#0000001.3221.001.0021.00
##FFFFFF15.941.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002153
Deuteranopia (green-blind)
#002250
Tritanopia (blue-blind)
#2F1E2E
Achromatopsia (no color)
#222222

Design tokens & code

CSS
--color: #340c51;
/* rgb */ color: rgb(52, 12, 81);
/* oklch */ color: oklch(26.6% 0.117 306.0);
Tailwind
colors: {
  custom: {
    50: '#6f5082',
    500: '#340c51',
    950: '#000000',
  },
}
SCSS
$custom: #340c51;
$custom-light: #6f5082;
$custom-dark: #000000;
JSON
{
  "hex": "#340c51",
  "rgb": {
    "r": 52,
    "g": 12,
    "b": 81
  },
  "hsl": {
    "h": 274.783,
    "s": 74.194,
    "l": 18.235
  },
  "oklch": {
    "l": 0.26624,
    "c": 0.11701,
    "h": 306
  },
  "luminance": 0.01587
}

Semantic roles & 50–950 ramp

primary
#340C51
secondary
#558C2C
accent
#F13785
background
#F6F4F8
surface
#ECE7EF
border
#C7C3CA
text
#08020A
muted
#7B787C

Preview Lab

Preview with #340C51

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

Preview Lab → · Contrast checker → · Palette generator →

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