#340742#340742

#340742 is a very dark, moderate purple. Relative luminance 0.013; OKLCH L 24.8% C 0.107 H 316.4°. Best body text is #FFFFFF at 16.73:1 contrast (WCAG AA passes).

Color values

HEX#340742
RGBrgb(52, 7, 66)
HSLhsl(286, 81%, 14%)
HSVhsv(286, 89%, 26%)
CMYKcmyk(21.2%, 89.4%, 0%, 74.1%)
CIE-LABlab(11.10, 31.38, -26.15)
CIE-LCHlch(11.10, 40.85, 320.20°)
OKLaboklab(24.77% 0.0775 -0.0738)
OKLCHoklch(24.77% 0.107 316.4)
XYZxyz(2.4754, 1.2755, 5.2690)
Luminance0.0127 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340742 #154207
analogous
#170742 #340742 #420733
triadic
#340742 #423407 #074234
tetradic
#340742 #421707 #154207 #073342
square
#340742 #421707 #154207 #073342
split-complementary
#340742 #334207 #074217
monochromatic
#16031C #16031C #340742 #600D79 #8B13B1

Accessibility & contrast

On white

16.73
#340742 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.25
#340742 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #340742
16.73:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340742#FFFFFF#000000##FFFFFF
##3407421.0016.731.2516.73
#FFFFFF16.731.0021.001.00
#0000001.2521.001.0021.00
##FFFFFF16.731.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001B44
Deuteranopia (green-blind)
#071F41
Tritanopia (blue-blind)
#331525
Achromatopsia (no color)
#1E1E1E

Design tokens & code

CSS
--color: #340742;
/* rgb */ color: rgb(52, 7, 66);
/* oklch */ color: oklch(24.8% 0.107 316.4);
Tailwind
colors: {
  custom: {
    50: '#6e4d77',
    500: '#340742',
    950: '#000000',
  },
}
SCSS
$custom: #340742;
$custom-light: #6e4d77;
$custom-dark: #000000;
JSON
{
  "hex": "#340742",
  "rgb": {
    "r": 52,
    "g": 7,
    "b": 66
  },
  "hsl": {
    "h": 285.763,
    "s": 80.822,
    "l": 14.314
  },
  "oklch": {
    "l": 0.24774,
    "c": 0.10701,
    "h": 316.4
  },
  "luminance": 0.01275
}

Semantic roles & 50–950 ramp

primary
#340742
secondary
#3A8124
accent
#F73160
background
#F6F4F7
surface
#ECE7ED
border
#C7C3C8
text
#070108
muted
#7A777B

Preview Lab

Preview with #340742

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

Preview Lab → · Contrast checker → · Palette generator →

#340742 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva