#42187B#42187B

#42187B is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.8% C 0.154 H 296.3°. Best body text is #FFFFFF at 12.74:1 contrast (WCAG AA passes).

Color values

HEX#42187B
RGBrgb(66, 24, 123)
HSLhsl(265, 67%, 29%)
HSVhsv(265, 80%, 48%)
CMYKcmyk(46.3%, 80.5%, 0%, 51.8%)
CIE-LABlab(20.99, 41.28, -48.07)
CIE-LCHlch(20.99, 63.36, 310.66°)
OKLaboklab(33.76% 0.068 -0.1377)
OKLCHoklch(33.76% 0.154 296.3)
XYZxyz(6.1476, 3.2414, 19.0368)
Luminance0.0324 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#42187B #517B18
analogous
#181F7B #42187B #74187B
triadic
#42187B #7B4218 #187B42
tetradic
#42187B #7B181F #517B18 #187B74
square
#42187B #7B181F #517B18 #187B74
split-complementary
#42187B #7B7418 #1F7B18
monochromatic
#0E051A #270E48 #42187B #5D22AE #7A36D8

Accessibility & contrast

On white

12.74
#42187B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.65
#42187B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #42187B
12.74:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##42187B#FFFFFF#000000##FFFFFF
##42187B1.0012.741.6512.74
#FFFFFF12.741.0021.001.00
#0000001.6521.001.0021.00
##FFFFFF12.741.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00337E
Deuteranopia (green-blind)
#003179
Tritanopia (blue-blind)
#323349
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #42187b;
/* rgb */ color: rgb(66, 24, 123);
/* oklch */ color: oklch(33.8% 0.154 296.3);
Tailwind
colors: {
  custom: {
    50: '#7d5aa2',
    500: '#42187b',
    950: '#000000',
  },
}
SCSS
$custom: #42187b;
$custom-light: #7d5aa2;
$custom-dark: #000000;
JSON
{
  "hex": "#42187b",
  "rgb": {
    "r": 66,
    "g": 24,
    "b": 123
  },
  "hsl": {
    "h": 265.455,
    "s": 67.347,
    "l": 28.824
  },
  "oklch": {
    "l": 0.33761,
    "c": 0.1536,
    "h": 296.3
  },
  "luminance": 0.03242
}

Semantic roles & 50–950 ramp

primary
#42187B
secondary
#80B03F
accent
#EA3EA1
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #42187B

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

Preview Lab → · Contrast checker → · Palette generator →

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