#3A228B#3A228B

#3A228B is a dark, vivid violet. Relative luminance 0.039; OKLCH L 35.7% C 0.162 H 285.2°. Best body text is #FFFFFF at 11.79:1 contrast (WCAG AA passes).

Color values

HEX#3A228B
RGBrgb(58, 34, 139)
HSLhsl(254, 61%, 34%)
HSVhsv(254, 76%, 55%)
CMYKcmyk(58.3%, 75.5%, 0%, 45.5%)
CIE-LABlab(23.36, 39.67, -54.29)
CIE-LCHlch(23.36, 67.24, 306.16°)
OKLaboklab(35.69% 0.0425 -0.1563)
OKLCHoklch(35.69% 0.162 285.2)
XYZxyz(6.9757, 3.9073, 24.8077)
Luminance0.0391 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#3A228B #738B22
analogous
#223F8B #3A228B #6F228B
triadic
#3A228B #8B3A22 #228B3A
tetradic
#3A228B #8B223F #738B22 #228B6F
square
#3A228B #8B223F #738B22 #228B6F
split-complementary
#3A228B #8B6F22 #3F8B22
monochromatic
#110A29 #25165A #3A228B #4F2EBC #7053D5

Accessibility & contrast

On white

11.79
#3A228B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.78
#3A228B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #3A228B
11.79:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##3A228B#FFFFFF#000000##FFFFFF
##3A228B1.0011.791.7811.79
#FFFFFF11.791.0021.001.00
#0000001.7821.001.0021.00
##FFFFFF11.791.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B8E
Deuteranopia (green-blind)
#003489
Tritanopia (blue-blind)
#113F54
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #3a228b;
/* rgb */ color: rgb(58, 34, 139);
/* oklch */ color: oklch(35.7% 0.162 285.2);
Tailwind
colors: {
  custom: {
    50: '#7a60ae',
    500: '#3a228b',
    950: '#000000',
  },
}
SCSS
$custom: #3a228b;
$custom-light: #7a60ae;
$custom-dark: #000000;
JSON
{
  "hex": "#3a228b",
  "rgb": {
    "r": 58,
    "g": 34,
    "b": 139
  },
  "hsl": {
    "h": 253.714,
    "s": 60.694,
    "l": 33.922
  },
  "oklch": {
    "l": 0.35688,
    "c": 0.16198,
    "h": 285.2
  },
  "luminance": 0.03908
}

Semantic roles & 50–950 ramp

primary
#3A228B
secondary
#A1B850
accent
#E444BF
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0510
muted
#7C797F

Preview Lab

Preview with #3A228B

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

Preview Lab → · Contrast checker → · Palette generator →

#3A228B Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva