#42217F#42217F

#42217F is a dark, vivid violet. Relative luminance 0.038; OKLCH L 35.2% C 0.148 H 293.3°. Best body text is #FFFFFF at 11.96:1 contrast (WCAG AA passes).

Color values

HEX#42217F
RGBrgb(66, 33, 127)
HSLhsl(261, 59%, 31%)
HSVhsv(261, 74%, 50%)
CMYKcmyk(48%, 74%, 0%, 50.2%)
CIE-LABlab(22.92, 37.95, -47.44)
CIE-LCHlch(22.92, 60.75, 308.66°)
OKLaboklab(35.24% 0.0587 -0.1359)
OKLCHoklch(35.24% 0.148 293.3)
XYZxyz(6.6203, 3.7781, 20.4550)
Luminance0.0378 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#42217F #5E7F21
analogous
#212F7F #42217F #71217F
triadic
#42217F #7F4221 #217F42
tetradic
#42217F #7F212F #5E7F21 #217F71
square
#42217F #7F212F #5E7F21 #217F71
split-complementary
#42217F #7F7121 #2F7F21
monochromatic
#10081E #29144E #42217F #5B2EB0 #794AD0

Accessibility & contrast

On white

11.96
#42217F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.76
#42217F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #42217F
11.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##42217F#FFFFFF#000000##FFFFFF
##42217F1.0011.961.7611.96
#FFFFFF11.961.0021.001.00
#0000001.7621.001.0021.00
##FFFFFF11.961.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003882
Deuteranopia (green-blind)
#00357D
Tritanopia (blue-blind)
#30394E
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #42217f;
/* rgb */ color: rgb(66, 33, 127);
/* oklch */ color: oklch(35.2% 0.148 293.3);
Tailwind
colors: {
  custom: {
    50: '#7d5fa5',
    500: '#42217f',
    950: '#000000',
  },
}
SCSS
$custom: #42217f;
$custom-light: #7d5fa5;
$custom-dark: #000000;
JSON
{
  "hex": "#42217f",
  "rgb": {
    "r": 66,
    "g": 33,
    "b": 127
  },
  "hsl": {
    "h": 261.064,
    "s": 58.75,
    "l": 31.373
  },
  "oklch": {
    "l": 0.35239,
    "c": 0.14806,
    "h": 293.3
  },
  "luminance": 0.03778
}

Semantic roles & 50–950 ramp

primary
#42217F
secondary
#8DB24A
accent
#E246AB
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A050F
muted
#7C797F

Preview Lab

Preview with #42217F

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

Preview Lab → · Contrast checker → · Palette generator →

#42217F Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva