#42238C#42238C

#42238C is a dark, vivid violet. Relative luminance 0.043; OKLCH L 36.7% C 0.162 H 289.4°. Best body text is #FFFFFF at 11.35:1 contrast (WCAG AA passes).

Color values

HEX#42238C
RGBrgb(66, 35, 140)
HSLhsl(258, 60%, 34%)
HSVhsv(258, 75%, 55%)
CMYKcmyk(52.9%, 75%, 0%, 45.1%)
CIE-LABlab(24.49, 40.69, -53.02)
CIE-LCHlch(24.49, 66.83, 307.50°)
OKLaboklab(36.72% 0.0538 -0.1523)
OKLCHoklch(36.72% 0.162 289.4)
XYZxyz(7.5801, 4.2534, 25.2274)
Luminance0.0425 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#42238C #6D8C23
analogous
#23398C #42238C #77238C
triadic
#42238C #8C4223 #238C42
tetradic
#42238C #8C2339 #6D8C23 #238C77
square
#42238C #8C2339 #6D8C23 #238C77
split-complementary
#42238C #8C7723 #398C23
monochromatic
#140B2A #2B175B #42238C #592FBD #7B55D4

Accessibility & contrast

On white

11.35
#42238C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.85
#42238C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #42238C
11.35:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##42238C#FFFFFF#000000##FFFFFF
##42238C1.0011.351.8511.35
#FFFFFF11.351.0021.001.00
#0000001.8521.001.0021.00
##FFFFFF11.351.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C8F
Deuteranopia (green-blind)
#00388A
Tritanopia (blue-blind)
#273F55
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #42238c;
/* rgb */ color: rgb(66, 35, 140);
/* oklch */ color: oklch(36.7% 0.162 289.4);
Tailwind
colors: {
  custom: {
    50: '#7f61af',
    500: '#42238c',
    950: '#000000',
  },
}
SCSS
$custom: #42238c;
$custom-light: #7f61af;
$custom-dark: #000000;
JSON
{
  "hex": "#42238c",
  "rgb": {
    "r": 66,
    "g": 35,
    "b": 140
  },
  "hsl": {
    "h": 257.714,
    "s": 60,
    "l": 34.314
  },
  "oklch": {
    "l": 0.36716,
    "c": 0.16155,
    "h": 289.4
  },
  "luminance": 0.04254
}

Semantic roles & 50–950 ramp

primary
#42238C
secondary
#9AB852
accent
#E345B4
background
#F8F5FA
surface
#EFEAF5
border
#CAC6CF
text
#0B0510
muted
#7C797F

Preview Lab

Preview with #42238C

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

Preview Lab → · Contrast checker → · Palette generator →

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