#42157C#42157C

#42157C is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.5% C 0.158 H 296.4°. Best body text is #FFFFFF at 12.88:1 contrast (WCAG AA passes).

Color values

HEX#42157C
RGBrgb(66, 21, 124)
HSLhsl(266, 71%, 28%)
HSVhsv(266, 83%, 49%)
CMYKcmyk(46.8%, 83.1%, 0%, 51.4%)
CIE-LABlab(20.63, 42.85, -49.28)
CIE-LCHlch(20.63, 65.30, 311.01°)
OKLaboklab(33.55% 0.0701 -0.1412)
OKLCHoklch(33.55% 0.158 296.4)
XYZxyz(6.1521, 3.1497, 19.3487)
Luminance0.0315 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#42157C #4F7C15
analogous
#151B7C #42157C #75157C
triadic
#42157C #7C4215 #157C42
tetradic
#42157C #7C151B #4F7C15 #157C75
square
#42157C #7C151B #4F7C15 #157C75
split-complementary
#42157C #7C7515 #1B7C15
monochromatic
#0E041A #260C48 #42157C #5E1EB0 #7B30DC

Accessibility & contrast

On white

12.88
#42157C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.63
#42157C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #42157C
12.88:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##42157C#FFFFFF#000000##FFFFFF
##42157C1.0012.881.6312.88
#FFFFFF12.881.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.881.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00327F
Deuteranopia (green-blind)
#00307A
Tritanopia (blue-blind)
#323249
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #42157c;
/* rgb */ color: rgb(66, 21, 124);
/* oklch */ color: oklch(33.5% 0.158 296.4);
Tailwind
colors: {
  custom: {
    50: '#7d59a3',
    500: '#42157c',
    950: '#000000',
  },
}
SCSS
$custom: #42157c;
$custom-light: #7d59a3;
$custom-dark: #000000;
JSON
{
  "hex": "#42157c",
  "rgb": {
    "r": 66,
    "g": 21,
    "b": 124
  },
  "hsl": {
    "h": 266.214,
    "s": 71.034,
    "l": 28.431
  },
  "oklch": {
    "l": 0.33545,
    "c": 0.15771,
    "h": 296.4
  },
  "luminance": 0.0315
}

Semantic roles & 50–950 ramp

primary
#42157C
secondary
#7EB13C
accent
#EE3A9F
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #42157C

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

Preview Lab → · Contrast checker → · Palette generator →

#42157C Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva