#42157E#42157E

#42157E is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.7% C 0.160 H 295.7°. Best body text is #FFFFFF at 12.80:1 contrast (WCAG AA passes).

Color values

HEX#42157E
RGBrgb(66, 21, 126)
HSLhsl(266, 71%, 29%)
HSVhsv(266, 83%, 49%)
CMYKcmyk(47.6%, 83.3%, 0%, 50.6%)
CIE-LABlab(20.83, 43.38, -50.23)
CIE-LCHlch(20.83, 66.37, 310.82°)
OKLaboklab(33.74% 0.0695 -0.144)
OKLCHoklch(33.74% 0.16 295.7)
XYZxyz(6.2798, 3.2008, 20.0216)
Luminance0.0320 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#42157E #517E15
analogous
#151D7E #42157E #77157E
triadic
#42157E #7E4215 #157E42
tetradic
#42157E #7E151D #517E15 #157E77
square
#42157E #7E151D #517E15 #157E77
split-complementary
#42157E #7E7715 #1D7E15
monochromatic
#0E041A #270C4A #42157E #5D1EB2 #7A31DD

Accessibility & contrast

On white

12.80
#42157E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.64
#42157E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #42157E
12.80:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##42157E#FFFFFF#000000##FFFFFF
##42157E1.0012.801.6412.80
#FFFFFF12.801.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.801.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003381
Deuteranopia (green-blind)
#00317C
Tritanopia (blue-blind)
#31334A
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #42157e;
/* rgb */ color: rgb(66, 21, 126);
/* oklch */ color: oklch(33.7% 0.160 295.7);
Tailwind
colors: {
  custom: {
    50: '#7d59a4',
    500: '#42157e',
    950: '#000000',
  },
}
SCSS
$custom: #42157e;
$custom-light: #7d59a4;
$custom-dark: #000000;
JSON
{
  "hex": "#42157e",
  "rgb": {
    "r": 66,
    "g": 21,
    "b": 126
  },
  "hsl": {
    "h": 265.714,
    "s": 71.429,
    "l": 28.824
  },
  "oklch": {
    "l": 0.33742,
    "c": 0.1599,
    "h": 295.7
  },
  "luminance": 0.03201
}

Semantic roles & 50–950 ramp

primary
#42157E
secondary
#80B33C
accent
#EE3AA1
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0B040F
muted
#7C797F

Preview Lab

Preview with #42157E

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

Preview Lab → · Contrast checker → · Palette generator →

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