#340F42#340F42

#340F42 is a dark, moderate purple. Relative luminance 0.015; OKLCH L 25.7% C 0.096 H 315.2°. Best body text is #FFFFFF at 16.24:1 contrast (WCAG AA passes).

Color values

HEX#340F42
RGBrgb(52, 15, 66)
HSLhsl(284, 63%, 16%)
HSVhsv(284, 77%, 26%)
CMYKcmyk(21.2%, 77.3%, 0%, 74.1%)
CIE-LABlab(12.39, 27.73, -24.09)
CIE-LCHlch(12.39, 36.73, 319.02°)
OKLaboklab(25.68% 0.0682 -0.0678)
OKLCHoklch(25.68% 0.096 315.2)
XYZxyz(2.5702, 1.4652, 5.3006)
Luminance0.0146 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340F42 #1D420F
analogous
#1A0F42 #340F42 #420F36
triadic
#340F42 #42340F #0F4234
tetradic
#340F42 #421A0F #1D420F #0F3642
square
#340F42 #421A0F #1D420F #0F3642
split-complementary
#340F42 #36420F #0F421A
monochromatic
#140619 #140619 #340F42 #5B1A74 #8326A6

Accessibility & contrast

On white

16.24
#340F42 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.29
#340F42 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #340F42
16.24:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340F42#FFFFFF#000000##FFFFFF
##340F421.0016.241.2916.24
#FFFFFF16.241.0021.001.00
#0000001.2921.001.0021.00
##FFFFFF16.241.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001E43
Deuteranopia (green-blind)
#0E2141
Tritanopia (blue-blind)
#331927
Achromatopsia (no color)
#202020

Design tokens & code

CSS
--color: #340f42;
/* rgb */ color: rgb(52, 15, 66);
/* oklch */ color: oklch(25.7% 0.096 315.2);
Tailwind
colors: {
  custom: {
    50: '#6e5177',
    500: '#340f42',
    950: '#000000',
  },
}
SCSS
$custom: #340f42;
$custom-light: #6e5177;
$custom-dark: #000000;
JSON
{
  "hex": "#340f42",
  "rgb": {
    "r": 52,
    "g": 15,
    "b": 66
  },
  "hsl": {
    "h": 283.529,
    "s": 62.963,
    "l": 15.882
  },
  "oklch": {
    "l": 0.25684,
    "c": 0.09616,
    "h": 315.2
  },
  "luminance": 0.01465
}

Semantic roles & 50–950 ramp

primary
#340F42
secondary
#457C30
accent
#E6426F
background
#F6F4F7
surface
#ECE7ED
border
#C7C3C8
text
#070208
muted
#7A787B

Preview Lab

Preview with #340F42

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

Preview Lab → · Contrast checker → · Palette generator →

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