#AB40A2#AB40A2

#AB40A2 is a mid, vivid purple. Relative luminance 0.149; OKLCH L 55.4% C 0.181 H 331.2°. Best body text is #FFFFFF at 5.27:1 contrast (WCAG AA passes).

Color values

HEX#AB40A2
RGBrgb(171, 64, 162)
HSLhsl(305, 46%, 46%)
HSVhsv(305, 63%, 67%)
CMYKcmyk(0%, 62.6%, 5.3%, 32.9%)
CIE-LABlab(45.55, 55.72, -31.84)
CIE-LCHlch(45.55, 64.17, 330.25°)
OKLaboklab(55.41% 0.1587 -0.0873)
OKLCHoklch(55.41% 0.181 331.2)
XYZxyz(25.1495, 14.9352, 35.7336)
Luminance0.1493 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AB40A2 #40AB49
analogous
#7E40AB #AB40A2 #AB406C
triadic
#AB40A2 #A2AB40 #40A2AB
tetradic
#AB40A2 #AB7E40 #40AB49 #406CAB
square
#AB40A2 #AB7E40 #40AB49 #406CAB
split-complementary
#AB40A2 #6CAB40 #40AB7E
monochromatic
#521F4E #7E2F78 #AB40A2 #C563BD #D590D0

Accessibility & contrast

On white

5.27
#AB40A2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.99
#AB40A2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #AB40A2
5.27:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AB40A2#FFFFFF#000000##FFFFFF
##AB40A21.005.273.995.27
#FFFFFF5.271.0021.001.00
#0000003.9921.001.0021.00
##FFFFFF5.271.0021.001.00

Color blindness preview

Protanopia (red-blind)
#3A62A5
Deuteranopia (green-blind)
#5E719F
Tritanopia (blue-blind)
#B24A6B
Achromatopsia (no color)
#6C6C6C

Design tokens & code

CSS
--color: #ab40a2;
/* rgb */ color: rgb(171, 64, 162);
/* oklch */ color: oklch(55.4% 0.181 331.2);
Tailwind
colors: {
  custom: {
    50: '#c77cbe',
    500: '#ab40a2',
    950: '#000000',
  },
}
SCSS
$custom: #ab40a2;
$custom-light: #c77cbe;
$custom-dark: #000000;
JSON
{
  "hex": "#ab40a2",
  "rgb": {
    "r": 171,
    "g": 64,
    "b": 162
  },
  "hsl": {
    "h": 305.047,
    "s": 45.532,
    "l": 46.078
  },
  "oklch": {
    "l": 0.55406,
    "c": 0.18115,
    "h": 331.2
  },
  "luminance": 0.14933
}

Semantic roles & 50–950 ramp

primary
#AB40A2
secondary
#86C18B
accent
#D55E53
background
#FCF7FB
surface
#F8EEF6
border
#D1C9D0
text
#130A12
muted
#827C81

Preview Lab

Preview with #AB40A2

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

Preview Lab → · Contrast checker → · Palette generator →

#AB40A2 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva