#42227F#42227F

#42227F is a dark, vivid violet. Relative luminance 0.038; OKLCH L 35.4% C 0.147 H 293.1°. Best body text is #FFFFFF at 11.88:1 contrast (WCAG AA passes).

Color values

HEX#42227F
RGBrgb(66, 34, 127)
HSLhsl(261, 58%, 32%)
HSVhsv(261, 73%, 50%)
CMYKcmyk(48%, 73.2%, 0%, 50.2%)
CIE-LABlab(23.12, 37.41, -47.12)
CIE-LCHlch(23.12, 60.17, 308.45°)
OKLaboklab(35.38% 0.0577 -0.135)
OKLCHoklch(35.38% 0.147 293.1)
XYZxyz(6.6485, 3.8344, 20.4644)
Luminance0.0384 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#42227F #5F7F22
analogous
#22317F #42227F #71227F
triadic
#42227F #7F4222 #227F42
tetradic
#42227F #7F2231 #5F7F22 #227F71
square
#42227F #7F2231 #5F7F22 #227F71
split-complementary
#42227F #7F7122 #317F22
monochromatic
#10081E #29154F #42227F #5B2FAF #794CCF

Accessibility & contrast

On white

11.88
#42227F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.77
#42227F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #42227F
11.88:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##42227F#FFFFFF#000000##FFFFFF
##42227F1.0011.881.7711.88
#FFFFFF11.881.0021.001.00
#0000001.7721.001.0021.00
##FFFFFF11.881.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #42227f;
/* rgb */ color: rgb(66, 34, 127);
/* oklch */ color: oklch(35.4% 0.147 293.1);
Tailwind
colors: {
  custom: {
    50: '#7d60a5',
    500: '#42227f',
    950: '#000000',
  },
}
SCSS
$custom: #42227f;
$custom-light: #7d60a5;
$custom-dark: #000000;
JSON
{
  "hex": "#42227f",
  "rgb": {
    "r": 66,
    "g": 34,
    "b": 127
  },
  "hsl": {
    "h": 260.645,
    "s": 57.764,
    "l": 31.569
  },
  "oklch": {
    "l": 0.35375,
    "c": 0.14682,
    "h": 293.1
  },
  "luminance": 0.03835
}

Semantic roles & 50–950 ramp

primary
#42227F
secondary
#8EB24B
accent
#E147AC
background
#F7F5FA
surface
#EEEAF4
border
#C9C6CE
text
#0A050F
muted
#7C797F

Preview Lab

Preview with #42227F

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

Preview Lab → · Contrast checker → · Palette generator →

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