#42227C#42227C

#42227C is a dark, vivid violet. Relative luminance 0.038; OKLCH L 35.1% C 0.143 H 294.0°. Best body text is #FFFFFF at 11.99:1 contrast (WCAG AA passes).

Color values

HEX#42227C
RGBrgb(66, 34, 124)
HSLhsl(261, 57%, 31%)
HSVhsv(261, 73%, 49%)
CMYKcmyk(46.8%, 72.6%, 0%, 51.4%)
CIE-LABlab(22.85, 36.54, -45.65)
CIE-LCHlch(22.85, 58.47, 308.67°)
OKLaboklab(35.11% 0.0583 -0.1307)
OKLCHoklch(35.11% 0.143 294)
XYZxyz(6.4559, 3.7574, 19.4500)
Luminance0.0376 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#42227C #5C7C22
analogous
#222F7C #42227C #6F227C
triadic
#42227C #7C4222 #227C42
tetradic
#42227C #7C222F #5C7C22 #227C6F
square
#42227C #7C222F #5C7C22 #227C6F
split-complementary
#42227C #7C6F22 #2F7C22
monochromatic
#0F081C #28154C #42227C #5C2FAC #794BCE

Accessibility & contrast

On white

11.99
#42227C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.75
#42227C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #42227C
11.99:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##42227C#FFFFFF#000000##FFFFFF
##42227C1.0011.991.7511.99
#FFFFFF11.991.0021.001.00
#0000001.7521.001.0021.00
##FFFFFF11.991.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00377F
Deuteranopia (green-blind)
#00357A
Tritanopia (blue-blind)
#31394C
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #42227c;
/* rgb */ color: rgb(66, 34, 124);
/* oklch */ color: oklch(35.1% 0.143 294.0);
Tailwind
colors: {
  custom: {
    50: '#7c60a3',
    500: '#42227c',
    950: '#000000',
  },
}
SCSS
$custom: #42227c;
$custom-light: #7c60a3;
$custom-dark: #000000;
JSON
{
  "hex": "#42227c",
  "rgb": {
    "r": 66,
    "g": 34,
    "b": 124
  },
  "hsl": {
    "h": 261.333,
    "s": 56.962,
    "l": 30.98
  },
  "oklch": {
    "l": 0.35106,
    "c": 0.1431,
    "h": 294
  },
  "luminance": 0.03758
}

Semantic roles & 50–950 ramp

primary
#42227C
secondary
#8BAF4B
accent
#E048AA
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A050F
muted
#7C797F

Preview Lab

Preview with #42227C

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

Preview Lab → · Contrast checker → · Palette generator →

#42227C Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva