#42187F#42187F

#42187F is a dark, vivid violet. Relative luminance 0.033; OKLCH L 34.1% C 0.158 H 295.0°. Best body text is #FFFFFF at 12.58:1 contrast (WCAG AA passes).

Color values

HEX#42187F
RGBrgb(66, 24, 127)
HSLhsl(264, 68%, 30%)
HSVhsv(264, 81%, 50%)
CMYKcmyk(48%, 81.1%, 0%, 50.2%)
CIE-LABlab(21.37, 42.37, -49.98)
CIE-LCHlch(21.37, 65.52, 310.29°)
OKLaboklab(34.15% 0.0668 -0.1433)
OKLCHoklch(34.15% 0.158 295)
XYZxyz(6.4031, 3.3436, 20.3826)
Luminance0.0334 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#42187F #557F18
analogous
#18227F #42187F #76187F
triadic
#42187F #7F4218 #187F42
tetradic
#42187F #7F1822 #557F18 #187F76
square
#42187F #7F1822 #557F18 #187F76
split-complementary
#42187F #7F7618 #227F18
monochromatic
#0D051A #270E4C #42187F #5D22B2 #7A38D9

Accessibility & contrast

On white

12.58
#42187F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.67
#42187F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #42187F
12.58:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##42187F#FFFFFF#000000##FFFFFF
##42187F1.0012.581.6712.58
#FFFFFF12.581.0021.001.00
#0000001.6721.001.0021.00
##FFFFFF12.581.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003482
Deuteranopia (green-blind)
#00327D
Tritanopia (blue-blind)
#30354B
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #42187f;
/* rgb */ color: rgb(66, 24, 127);
/* oklch */ color: oklch(34.1% 0.158 295.0);
Tailwind
colors: {
  custom: {
    50: '#7d5ba5',
    500: '#42187f',
    950: '#000000',
  },
}
SCSS
$custom: #42187f;
$custom-light: #7d5ba5;
$custom-dark: #000000;
JSON
{
  "hex": "#42187f",
  "rgb": {
    "r": 66,
    "g": 24,
    "b": 127
  },
  "hsl": {
    "h": 264.466,
    "s": 68.212,
    "l": 29.608
  },
  "oklch": {
    "l": 0.34147,
    "c": 0.15811,
    "h": 295
  },
  "luminance": 0.03344
}

Semantic roles & 50–950 ramp

primary
#42187F
secondary
#84B33F
accent
#EB3DA4
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #42187F

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

Preview Lab → · Contrast checker → · Palette generator →

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