#42157B#42157B

#42157B is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.4% C 0.157 H 296.7°. Best body text is #FFFFFF at 12.92:1 contrast (WCAG AA passes).

Color values

HEX#42157B
RGBrgb(66, 21, 123)
HSLhsl(266, 71%, 28%)
HSVhsv(266, 83%, 48%)
CMYKcmyk(46.3%, 82.9%, 0%, 51.8%)
CIE-LABlab(20.54, 42.59, -48.80)
CIE-LCHlch(20.54, 64.77, 311.11°)
OKLaboklab(33.45% 0.0705 -0.1398)
OKLCHoklch(33.45% 0.157 296.7)
XYZxyz(6.0891, 3.1245, 19.0173)
Luminance0.0313 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#42157B #4E7B15
analogous
#151B7B #42157B #75157B
triadic
#42157B #7B4215 #157B42
tetradic
#42157B #7B151B #4E7B15 #157B75
square
#42157B #7B151B #4E7B15 #157B75
split-complementary
#42157B #7B7515 #1B7B15
monochromatic
#0E041A #260C47 #42157B #5E1EAF #7B2FDB

Accessibility & contrast

On white

12.92
#42157B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #42157B
12.92:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##42157B#FFFFFF#000000##FFFFFF
##42157B1.0012.921.6312.92
#FFFFFF12.921.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.921.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00327E
Deuteranopia (green-blind)
#003079
Tritanopia (blue-blind)
#323248
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #42157b;
/* rgb */ color: rgb(66, 21, 123);
/* oklch */ color: oklch(33.4% 0.157 296.7);
Tailwind
colors: {
  custom: {
    50: '#7d59a2',
    500: '#42157b',
    950: '#000000',
  },
}
SCSS
$custom: #42157b;
$custom-light: #7d59a2;
$custom-dark: #000000;
JSON
{
  "hex": "#42157b",
  "rgb": {
    "r": 66,
    "g": 21,
    "b": 123
  },
  "hsl": {
    "h": 266.471,
    "s": 70.833,
    "l": 28.235
  },
  "oklch": {
    "l": 0.33447,
    "c": 0.15661,
    "h": 296.7
  },
  "luminance": 0.03125
}

Semantic roles & 50–950 ramp

primary
#42157B
secondary
#7DB03B
accent
#EE3A9E
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #42157B

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

Preview Lab → · Contrast checker → · Palette generator →

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