#340548#340548

#340548 is a dark, moderate purple. Relative luminance 0.013; OKLCH L 25.1% C 0.116 H 312.6°. Best body text is #FFFFFF at 16.65:1 contrast (WCAG AA passes).

Color values

HEX#340548
RGBrgb(52, 5, 72)
HSLhsl(282, 87%, 15%)
HSVhsv(282, 93%, 28%)
CMYKcmyk(27.8%, 93.1%, 0%, 71.8%)
CIE-LABlab(11.32, 33.66, -30.01)
CIE-LCHlch(11.32, 45.10, 318.27°)
OKLaboklab(25.09% 0.0782 -0.0851)
OKLCHoklch(25.09% 0.116 312.6)
XYZxyz(2.6399, 1.3066, 6.2428)
Luminance0.0131 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#340548 #194805
analogous
#130548 #340548 #48053A
triadic
#340548 #483405 #054834
tetradic
#340548 #481305 #194805 #053A48
square
#340548 #481305 #194805 #053A48
split-complementary
#340548 #3A4805 #054813
monochromatic
#15021D #15021D #340548 #5D0981 #870DBA

Accessibility & contrast

On white

16.65
#340548 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.26
#340548 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #340548
16.65:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##340548#FFFFFF#000000##FFFFFF
##3405481.0016.651.2616.65
#FFFFFF16.651.0021.001.00
#0000001.2621.001.0021.00
##FFFFFF16.651.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001C4A
Deuteranopia (green-blind)
#001F47
Tritanopia (blue-blind)
#321628
Achromatopsia (no color)
#1E1E1E

Design tokens & code

CSS
--color: #340548;
/* rgb */ color: rgb(52, 5, 72);
/* oklch */ color: oklch(25.1% 0.116 312.6);
Tailwind
colors: {
  custom: {
    50: '#6f4c7b',
    500: '#340548',
    950: '#000000',
  },
}
SCSS
$custom: #340548;
$custom-light: #6f4c7b;
$custom-dark: #000000;
JSON
{
  "hex": "#340548",
  "rgb": {
    "r": 52,
    "g": 5,
    "b": 72
  },
  "hsl": {
    "h": 282.09,
    "s": 87.013,
    "l": 15.098
  },
  "oklch": {
    "l": 0.25091,
    "c": 0.11555,
    "h": 312.6
  },
  "luminance": 0.01306
}

Semantic roles & 50–950 ramp

primary
#340548
secondary
#408821
accent
#FD2B69
background
#F6F4F7
surface
#ECE7EE
border
#C7C3C9
text
#080109
muted
#7B777B

Preview Lab

Preview with #340548

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

Preview Lab → · Contrast checker → · Palette generator →

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