Skip to content

#ac02a1

a dark, electric magenta / pink · neutral · closest name: Dark Magenta

RGB
172, 2, 161
HSL
304°, 98%, 34%
CMYK
0, 99, 6, 33
Luminance
0.1139

At a glance

Every number on this page in one read: what #ac02a1 is made of, how bright it looks, and which way it leans.

Hex
#ac02a1
Hue
304°
magenta / pink
Saturation
98%
electric
Lightness
34%
dark
Brightness
67%
HSV value
Perceived
43%
weighted brightness
Luminance
0.1139
WCAG relative
Temperature
Neutral
48/100 cool
Color family
Magenta / pink
Tone
Electric
Best ink
White
6.41:1
Closest name
Dark Magenta
ΔE2000 6.8
Where it sits
Hue304° of 360°
Saturation98%
Lightness34%
Temperature
Warm ← → Cool48% cool

Reads neutral. Warm and cool siblings keep the same lightness, so you can swap one in without redoing your contrast maths.

Every format

HEX#ac02a1
RGBrgb(172, 2, 161)
HSLhsl(304, 98%, 34%)
CMYKcmyk(0%, 99%, 6%, 33%)
LABlab(40.2 71.3 -39.6)
LCHlch(40.2 81.6 330.9)
OKLCHoklch(0.516 0.232 331.9)
Decimal11272865
Display P3color(display-p3 0.675 0.008 0.631)

Copy-ready code

/* CSS */
color: #ac02a1;
background-color: #ac02a1;
/* Tailwind (arbitrary) */
class="text-[#ac02a1] bg-[#ac02a1]"
/* SCSS */
$brand: #ac02a1;
/* SwiftUI */
Color(red: 0.675, green: 0.008, blue: 0.631)
/* Android */
Color.parseColor("#ac02a1")
/* Flutter */
Color(0xFFAC02A1)
/* Python / OpenCV (BGR) */
(161, 2, 172)

Best text color

Only one of black and white can be right. This is the one, with the number that proves it.

Readable at a glance#ffffff on #ac02a1 · 6.41:1
Use #ffffffAA at every size, AAA for large text only.
Aa
White text · 6.41:1 · recommended
AA pass · AA large pass · AAA fail
Aa
Black text · 3.28:1
AA fail · AA large pass · AAA fail
Reading the other direction: #ac02a1 as text scores 6.41:1 on white and 3.28:1 on black.

Accessibility — WCAG contrast

Aa
#ac02a1 on white: 6.41:1
AA ✓ pass · AA-large · AAA
Aa
#ac02a1 on black: 3.28:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #0051A4
deuteranopia · #4B669E
tritanopia · #B4285D

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #ac02a1 is pinned to step 800; the rest hold its hue and let saturation ease off at the extremes so the pale end never turns neon.

#FDF1FD
#FCE4FA
#FBC1F7
#FE90F7
#FD59F2
#FC21EE
#F203E2
#CA02BD
#ac02a1
#74066D
#490444
Base = 800Lightest = 50 · #FDF1FDDarkest = 950 · #490444
:root {
  --brand-50: #FDF1FD;
  --brand-100: #FCE4FA;
  --brand-200: #FBC1F7;
  --brand-300: #FE90F7;
  --brand-400: #FD59F2;
  --brand-500: #FC21EE;
  --brand-600: #F203E2;
  --brand-700: #CA02BD;
  --brand-800: #ac02a1;
  --brand-900: #74066D;
  --brand-950: #490444;
  --brand: #ac02a1;
  --brand-ink: #ffffff;
}

Colors that work with #ac02a1

Not a palette — a role sheet. Each swatch answers one question you will hit while building the component.

Text on it#ffffff
White wins here
Surface#FAF4FA
Tinted page background
Border#EDC0EA
Hairlines and dividers
Muted text#9B4B96
Captions on the surface
Accent#25CC00
Second voice, not a rival
Dark variant#7E0176
Hover, pressed, headers
Light variant#FFE6FD
Selected rows, tints
Dark surface#241423
Dark-mode background
Light mode
Everything in its place

Surface, border, heading and body all derive from this one hue, so the screen stays coherent without a second palette.

Primary actionSecondaryBadge
Dark mode
Same hue, inverted

Lightness flips, hue holds. The accent stays the anchor in both themes.

Primary actionSecondaryAccent

How to use #ac02a1

Derived from its contrast, chroma and lightness — not from taste.

Works well for
  • Body text and links on white
  • Primary buttons and calls to action
  • Focus rings, active and selected states
  • Headers, footers and dark-mode surfaces
  • Brand accents, badges and data highlights
Use with care
  • Full-page backgrounds — tiring over long sessions
  • Black text placed on it
  • Pairing with a same-lightness hue — edges vibrate

Similar colors

One move away from this hex in each direction. Every swatch is its own page.

Color relationships

The wheel positions with their names attached, so you can grab the one you actually need.

Complementary#02AC0D
Analogous left#6202AC
Analogous right#AC024C
Split-complement 1#4CAC02
Split-complement 2#02AC62
Triadic 1#A1AC02
Triadic 2#02A1AC
Tetradic#AC6202

RGB percentages

Red67.5%
Green0.8%
Blue63.1%

CMYK percentages

Cyan0.0%
Magenta98.8%
Yellow6.4%
Key (black)32.5%

Color previews

#ac02a1 text on a black background

contrast 3.28:1

Card sample

#ac02a1 text on a white background

contrast 6.41:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #ac02a1;
Background color
Panel with #ac02a1 background
background-color: #ac02a1;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #ac02a1;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(172, 2, 161, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(172, 2, 161, 0.45);
Border & gradient
Gradient panel
border: 3px solid #ac02a1;
background: linear-gradient(135deg, #ac02a1, #AC0230);

Monochromatic scale

Palettes built from #ac02a1

Shades — darker

Tints — lighter

Color harmonies

Nearest named colors

Ranked with CIEDE2000 across all 139 CSS keywords. Under ΔE 2 the eye stops telling them apart; over ΔE 10 they are plainly different colors.

#ac02a1 in the real world

Where a color in this family tends to land, and the interface roles it is usually asked to play.

Industries
BeautyFashionLifestyleYouth brands
Common UI roles
ButtonsLinksFocus statesCharts
Print note

Sits outside most CMYK gamuts — expect a duller press result, or specify a spot ink.

#ac02a1, answered

What color is #ac02a1?

#ac02a1 is a dark electric magenta / pink, closest to Dark Magenta (ΔE2000 6.8). It sits at 304° on the hue wheel with 98% saturation and 34% lightness, which reads as neutral.

What is the RGB value of #ac02a1?

rgb(172, 2, 161) — 172 red, 2 green and 161 blue out of 255, or 67.5% / 0.8% / 63.1% by channel.

Is #ac02a1 a light or a dark color?

It is a dark color. Relative luminance is 0.1139 and perceived brightness is 43%, so white text on it reaches 6.41:1.

Should I use black or white text on #ac02a1?

White. It scores 6.41:1 against #ac02a1, versus 3.28:1 for black — AA at any size.

What is the complementary color of #ac02a1?

#02AC0D sits directly opposite on the wheel. Softer options are the split-complements #4CAC02 and #02AC62, which give the same contrast with far less vibration.

What colors go well with #ac02a1?

For interface work: #FAF4FA as the surface, #EDC0EA for borders, #9B4B96 for secondary text, #25CC00 as an accent and #7E0176 for hover and pressed states. For a palette, the analogous pair #6202AC and #AC024C stays calm, while #02AC0D is the loudest partner.

What is #ac02a1 in CMYK for printing?

cmyk(0%, 99%, 6%, 33%). This is a screen-to-ink approximation — a color this saturated sits outside most CMYK gamuts and will print duller than it looks here.

Is #ac02a1 warm or cool?

Neutral — it scores 48 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #AC0263; nudged cooler, #7900AE.

Work with #ac02a1 in the Color Lab