#340F51#340F51

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

Color values

HEX#340F51
RGBrgb(52, 15, 81)
HSLhsl(274, 69%, 19%)
HSVhsv(274, 81%, 32%)
CMYKcmyk(35.8%, 81.5%, 0%, 68.2%)
CIE-LABlab(13.63, 31.57, -32.49)
CIE-LCHlch(13.63, 45.30, 314.18°)
OKLaboklab(26.96% 0.0657 -0.0924)
OKLCHoklch(26.96% 0.113 305.4)
XYZxyz(3.0719, 1.6658, 7.9427)
Luminance0.0167 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340F51 #2C510F
analogous
#130F51 #340F51 #510F4D
triadic
#340F51 #51340F #0F5134
tetradic
#340F51 #51130F #2C510F #0F4D51
square
#340F51 #51130F #2C510F #0F4D51
split-complementary
#340F51 #4D510F #0F5113
monochromatic
#11051A #13051D #340F51 #551985 #7622B8

Accessibility & contrast

On white

15.75
#340F51 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #340F51
15.75:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340F51#FFFFFF#000000##FFFFFF
##340F511.0015.751.3315.75
#FFFFFF15.751.0021.001.00
#0000001.3321.001.0021.00
##FFFFFF15.751.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002253
Deuteranopia (green-blind)
#002350
Tritanopia (blue-blind)
#2F1F2F
Achromatopsia (no color)
#232323

Design tokens & code

CSS
--color: #340f51;
/* rgb */ color: rgb(52, 15, 81);
/* oklch */ color: oklch(27.0% 0.113 305.4);
Tailwind
colors: {
  custom: {
    50: '#6f5282',
    500: '#340f51',
    950: '#000000',
  },
}
SCSS
$custom: #340f51;
$custom-light: #6f5282;
$custom-dark: #000000;
JSON
{
  "hex": "#340f51",
  "rgb": {
    "r": 52,
    "g": 15,
    "b": 81
  },
  "hsl": {
    "h": 273.636,
    "s": 68.75,
    "l": 18.824
  },
  "oklch": {
    "l": 0.26958,
    "c": 0.11343,
    "h": 305.4
  },
  "luminance": 0.01666
}

Semantic roles & 50–950 ramp

primary
#340F51
secondary
#588B31
accent
#EC3C89
background
#F6F4F8
surface
#ECE7EF
border
#C7C3CA
text
#08020A
muted
#7B787C

Preview Lab

Preview with #340F51

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

Preview Lab → · Contrast checker → · Palette generator →

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