#42238B#42238B

#42238B is a dark, vivid violet. Relative luminance 0.042; OKLCH L 36.6% C 0.160 H 289.7°. Best body text is #FFFFFF at 11.38:1 contrast (WCAG AA passes).

Color values

HEX#42238B
RGBrgb(66, 35, 139)
HSLhsl(258, 60%, 34%)
HSVhsv(258, 75%, 55%)
CMYKcmyk(52.5%, 74.8%, 0%, 45.5%)
CIE-LABlab(24.40, 40.39, -52.55)
CIE-LCHlch(24.40, 66.28, 307.54°)
OKLaboklab(36.62% 0.054 -0.151)
OKLCHoklch(36.62% 0.16 289.7)
XYZxyz(7.5067, 4.2241, 24.8409)
Luminance0.0422 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#42238B #6C8B23
analogous
#23388B #42238B #76238B
triadic
#42238B #8B4223 #238B42
tetradic
#42238B #8B2338 #6C8B23 #238B76
square
#42238B #8B2338 #6C8B23 #238B76
split-complementary
#42238B #8B7623 #388B23
monochromatic
#140A29 #2B175A #42238B #592FBC #7A54D4

Accessibility & contrast

On white

11.38
#42238B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.84
#42238B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #42238B
11.38:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##42238B#FFFFFF#000000##FFFFFF
##42238B1.0011.381.8411.38
#FFFFFF11.381.0021.001.00
#0000001.8421.001.0021.00
##FFFFFF11.381.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C8E
Deuteranopia (green-blind)
#003789
Tritanopia (blue-blind)
#283F55
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #42238b;
/* rgb */ color: rgb(66, 35, 139);
/* oklch */ color: oklch(36.6% 0.160 289.7);
Tailwind
colors: {
  custom: {
    50: '#7e61ae',
    500: '#42238b',
    950: '#000000',
  },
}
SCSS
$custom: #42238b;
$custom-light: #7e61ae;
$custom-dark: #000000;
JSON
{
  "hex": "#42238b",
  "rgb": {
    "r": 66,
    "g": 35,
    "b": 139
  },
  "hsl": {
    "h": 257.885,
    "s": 59.77,
    "l": 34.118
  },
  "oklch": {
    "l": 0.36621,
    "c": 0.16033,
    "h": 289.7
  },
  "luminance": 0.04224
}

Semantic roles & 50–950 ramp

primary
#42238B
secondary
#9AB852
accent
#E345B4
background
#F8F5FA
surface
#EFEAF4
border
#CAC6CE
text
#0B0510
muted
#7C797F

Preview Lab

Preview with #42238B

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

Preview Lab → · Contrast checker → · Palette generator →

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