#42187D#42187D

#42187D is a dark, vivid violet. Relative luminance 0.033; OKLCH L 34.0% C 0.156 H 295.6°. Best body text is #FFFFFF at 12.66:1 contrast (WCAG AA passes).

Color values

HEX#42187D
RGBrgb(66, 24, 125)
HSLhsl(265, 68%, 29%)
HSVhsv(265, 81%, 49%)
CMYKcmyk(47.2%, 80.8%, 0%, 51%)
CIE-LABlab(21.18, 41.83, -49.02)
CIE-LCHlch(21.18, 64.44, 310.47°)
OKLaboklab(33.95% 0.0674 -0.1405)
OKLCHoklch(33.95% 0.156 295.6)
XYZxyz(6.2741, 3.2920, 19.7029)
Luminance0.0329 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#42187D #537D18
analogous
#18217D #42187D #75187D
triadic
#42187D #7D4218 #187D42
tetradic
#42187D #7D1821 #537D18 #187D75
square
#42187D #7D1821 #537D18 #187D75
split-complementary
#42187D #7D7518 #217D18
monochromatic
#0E051A #270E4A #42187D #5D22B0 #7A37D9

Accessibility & contrast

On white

12.66
#42187D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.66
#42187D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #42187D
12.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##42187D#FFFFFF#000000##FFFFFF
##42187D1.0012.661.6612.66
#FFFFFF12.661.0021.001.00
#0000001.6621.001.0021.00
##FFFFFF12.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003480
Deuteranopia (green-blind)
#00317B
Tritanopia (blue-blind)
#31344A
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #42187d;
/* rgb */ color: rgb(66, 24, 125);
/* oklch */ color: oklch(34.0% 0.156 295.6);
Tailwind
colors: {
  custom: {
    50: '#7d5aa4',
    500: '#42187d',
    950: '#000000',
  },
}
SCSS
$custom: #42187d;
$custom-light: #7d5aa4;
$custom-dark: #000000;
JSON
{
  "hex": "#42187d",
  "rgb": {
    "r": 66,
    "g": 24,
    "b": 125
  },
  "hsl": {
    "h": 264.95,
    "s": 67.785,
    "l": 29.216
  },
  "oklch": {
    "l": 0.33953,
    "c": 0.15587,
    "h": 295.6
  },
  "luminance": 0.03292
}

Semantic roles & 50–950 ramp

primary
#42187D
secondary
#82B23F
accent
#EB3DA3
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #42187D

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

Preview Lab → · Contrast checker → · Palette generator →

#42187D Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva