#AB40CA#AB40CA

#AB40CA is a mid, highly saturated purple. Relative luminance 0.166; OKLCH L 57.7% C 0.216 H 317.7°. Best body text is #FFFFFF at 4.86:1 contrast (WCAG AA passes).

Color values

HEX#AB40CA
RGBrgb(171, 64, 202)
HSLhsl(287, 57%, 52%)
HSVhsv(287, 68%, 79%)
CMYKcmyk(15.3%, 68.3%, 0%, 20.8%)
CIE-LABlab(47.74, 62.98, -51.79)
CIE-LCHlch(47.74, 81.53, 320.57°)
OKLaboklab(57.7% 0.1596 -0.1453)
OKLCHoklch(57.7% 0.216 317.7)
XYZxyz(29.2871, 16.5902, 57.5252)
Luminance0.1659 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AB40CA #5FCA40
analogous
#6640CA #AB40CA #CA40A4
triadic
#AB40CA #CAAB40 #40CAAB
tetradic
#AB40CA #CA6640 #5FCA40 #40A4CA
square
#AB40CA #CA6640 #5FCA40 #40A4CA
split-complementary
#AB40CA #A4CA40 #40CA66
monochromatic
#5E1F70 #862CA0 #AB40CA #C070D7 #D5A0E5

Accessibility & contrast

On white

4.86
#AB40CA on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.32
#AB40CA on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #AB40CA
4.86:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AB40CA#FFFFFF#000000##FFFFFF
##AB40CA1.004.864.324.86
#FFFFFF4.861.0021.001.00
#0000004.3221.001.0021.00
##FFFFFF4.861.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006ACE
Deuteranopia (green-blind)
#4575C7
Tritanopia (blue-blind)
#AA5A80
Achromatopsia (no color)
#717171

Design tokens & code

CSS
--color: #ab40ca;
/* rgb */ color: rgb(171, 64, 202);
/* oklch */ color: oklch(57.7% 0.216 317.7);
Tailwind
colors: {
  custom: {
    50: '#c87ddb',
    500: '#ab40ca',
    950: '#000000',
  },
}
SCSS
$custom: #ab40ca;
$custom-light: #c87ddb;
$custom-dark: #000000;
JSON
{
  "hex": "#ab40ca",
  "rgb": {
    "r": 171,
    "g": 64,
    "b": 202
  },
  "hsl": {
    "h": 286.522,
    "s": 56.557,
    "l": 52.157
  },
  "oklch": {
    "l": 0.57699,
    "c": 0.21586,
    "h": 317.7
  },
  "luminance": 0.16589
}

Semantic roles & 50–950 ramp

primary
#AB40CA
secondary
#A2D195
accent
#E0486A
background
#FCF8FD
surface
#F9EFFB
border
#D2CAD4
text
#140A15
muted
#827C83

Preview Lab

Preview with #AB40CA

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

Preview Lab → · Contrast checker → · Palette generator →

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