#340C54#340C54

#340C54 is a dark, vivid violet. Relative luminance 0.016; OKLCH L 26.9% C 0.120 H 304.3°. Best body text is #FFFFFF at 15.83:1 contrast (WCAG AA passes).

Color values

HEX#340C54
RGBrgb(52, 12, 84)
HSLhsl(273, 75%, 19%)
HSVhsv(273, 86%, 33%)
CMYKcmyk(38.1%, 85.7%, 0%, 67.1%)
CIE-LABlab(13.43, 33.71, -34.85)
CIE-LCHlch(13.43, 48.49, 314.04°)
OKLaboklab(26.91% 0.0679 -0.0994)
OKLCHoklch(26.91% 0.12 304.3)
XYZxyz(3.1475, 1.6331, 8.5352)
Luminance0.0163 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340C54 #2C540C
analogous
#100C54 #340C54 #540C50
triadic
#340C54 #54340C #0C5434
tetradic
#340C54 #54100C #2C540C #0C5054
square
#340C54 #54100C #2C540C #0C5054
split-complementary
#340C54 #50540C #0C5410
monochromatic
#11041B #13041E #340C54 #55148A #761BBF

Accessibility & contrast

On white

15.83
#340C54 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.33
#340C54 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #340C54
15.83:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340C54#FFFFFF#000000##FFFFFF
##340C541.0015.831.3315.83
#FFFFFF15.831.0021.001.00
#0000001.3321.001.0021.00
##FFFFFF15.831.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002256
Deuteranopia (green-blind)
#002253
Tritanopia (blue-blind)
#2E1F30
Achromatopsia (no color)
#222222

Design tokens & code

CSS
--color: #340c54;
/* rgb */ color: rgb(52, 12, 84);
/* oklch */ color: oklch(26.9% 0.120 304.3);
Tailwind
colors: {
  custom: {
    50: '#705085',
    500: '#340c54',
    950: '#000000',
  },
}
SCSS
$custom: #340c54;
$custom-light: #705085;
$custom-dark: #000000;
JSON
{
  "hex": "#340c54",
  "rgb": {
    "r": 52,
    "g": 12,
    "b": 84
  },
  "hsl": {
    "h": 273.333,
    "s": 75,
    "l": 18.824
  },
  "oklch": {
    "l": 0.26906,
    "c": 0.12033,
    "h": 304.3
  },
  "luminance": 0.01633
}

Semantic roles & 50–950 ramp

primary
#340C54
secondary
#588F2D
accent
#F23689
background
#F7F4F8
surface
#EDE7EF
border
#C8C3CA
text
#08020B
muted
#7B787C

Preview Lab

Preview with #340C54

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

Preview Lab → · Contrast checker → · Palette generator →

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