Skip to content

#ac7af0

a light, electric violet · cool · closest name: Medium Purple

RGB
172, 122, 240
HSL
265°, 80%, 71%
CMYK
28, 49, 0, 6
Luminance
0.2898

At a glance

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

Hex
#ac7af0
Hue
265°
violet
Saturation
80%
electric
Lightness
71%
light
Brightness
94%
HSV value
Perceived
61%
weighted brightness
Luminance
0.2898
WCAG relative
Temperature
Cool
69/100 cool
Color family
Violet
Tone
Electric
Best ink
Black
6.80:1
Closest name
Medium Purple
ΔE2000 5.7
Where it sits
Hue265° of 360°
Saturation80%
Lightness71%
Temperature
Warm ← → Cool69% cool

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

Every format

HEX#ac7af0
RGBrgb(172, 122, 240)
HSLhsl(265, 80%, 71%)
CMYKcmyk(28%, 49%, 0%, 6%)
LABlab(60.8 42.9 -52.5)
LCHlch(60.8 67.8 309.2)
OKLCHoklch(0.679 0.173 301.5)
Decimal11303664
Display P3color(display-p3 0.675 0.478 0.941)

Copy-ready code

/* CSS */
color: #ac7af0;
background-color: #ac7af0;
/* Tailwind (arbitrary) */
class="text-[#ac7af0] bg-[#ac7af0]"
/* SCSS */
$brand: #ac7af0;
/* SwiftUI */
Color(red: 0.675, green: 0.478, blue: 0.941)
/* Android */
Color.parseColor("#ac7af0")
/* Flutter */
Color(0xFFAC7AF0)
/* Python / OpenCV (BGR) */
(240, 122, 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#000000 on #ac7af0 · 6.80:1
Use #000000AA at every size, AAA for large text only.
Aa
White text · 3.09:1
AA fail · AA large pass · AAA fail
Aa
Black text · 6.80:1 · recommended
AA pass · AA large pass · AAA fail
Reading the other direction: #ac7af0 as text scores 3.09:1 on white and 6.80:1 on black.

Accessibility — WCAG contrast

Aa
#ac7af0 on white: 3.09:1
AA ✗ fail · AA-large · AAA
Aa
#ac7af0 on black: 6.80:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #5492F4
deuteranopia · #6192ED
tritanopia · #9F90AA

Color scale — 50 to 950

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

#F7F3FC
#EEE6F9
#DAC7F5
#C09AF4
#ac7af0
#8135E8
#6B19DC
#5A15B7
#481193
#36106A
#220A42
Base = 400Lightest = 50 · #F7F3FCDarkest = 950 · #220A42
:root {
  --brand-50: #F7F3FC;
  --brand-100: #EEE6F9;
  --brand-200: #DAC7F5;
  --brand-300: #C09AF4;
  --brand-400: #ac7af0;
  --brand-500: #8135E8;
  --brand-600: #6B19DC;
  --brand-700: #5A15B7;
  --brand-800: #481193;
  --brand-900: #36106A;
  --brand-950: #220A42;
  --brand: #ac7af0;
  --brand-ink: #000000;
}

Colors that work with #ac7af0

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

Text on it#000000
Black wins here
Surface#F7F4FA
Tinted page background
Border#D3C0ED
Hairlines and dividers
Muted text#6D4B9B
Captions on the surface
Accent#9DBB11
Second voice, not a rival
Dark variant#380D73
Hover, pressed, headers
Light variant#F1E8FC
Selected rows, tints
Dark surface#1B1424
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 #ac7af0

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

Works well for
  • Headings from 24px up on white
  • Text and icons on dark surfaces
  • Primary buttons and calls to action
  • Focus rings, active and selected states
  • Card and section backgrounds
  • Brand accents, badges and data highlights
Use with care
  • Small text on white — under 4.5:1
  • Full-page backgrounds — tiring over long sessions
  • White 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#BEF07A
Analogous left#7A83F0
Analogous right#E77AF0
Split-complement 1#F0E77A
Split-complement 2#83F07A
Triadic 1#F0AC7A
Triadic 2#7AF0AC
Tetradic#F07A83

RGB percentages

Red67.5%
Green47.8%
Blue94.1%

CMYK percentages

Cyan28.3%
Magenta49.2%
Yellow0.0%
Key (black)5.9%

Color previews

#ac7af0 text on a black background

contrast 6.80:1

Card sample

#ac7af0 text on a white background

contrast 3.09:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #ac7af0

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.

#ac7af0 in the real world

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

Industries
Creative toolsFintechBeautyLuxury
Common UI roles
SurfacesBadgesHighlightsEmpty states
Print note

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

#ac7af0, answered

What color is #ac7af0?

#ac7af0 is a light electric violet, closest to Medium Purple (ΔE2000 5.7). It sits at 265° on the hue wheel with 80% saturation and 71% lightness, which reads as cool.

What is the RGB value of #ac7af0?

rgb(172, 122, 240) — 172 red, 122 green and 240 blue out of 255, or 67.5% / 47.8% / 94.1% by channel.

Is #ac7af0 a light or a dark color?

It is a mid-tone. Relative luminance is 0.2898 and perceived brightness is 61%, so black text on it reaches 6.80:1.

Should I use black or white text on #ac7af0?

Black. It scores 6.80:1 against #ac7af0, versus 3.09:1 for white — AA at any size.

What is the complementary color of #ac7af0?

#BEF07A sits directly opposite on the wheel. Softer options are the split-complements #F0E77A and #83F07A, which give the same contrast with far less vibration.

What colors go well with #ac7af0?

For interface work: #F7F4FA as the surface, #D3C0ED for borders, #6D4B9B for secondary text, #9DBB11 as an accent and #380D73 for hover and pressed states. For a palette, the analogous pair #7A83F0 and #E77AF0 stays calm, while #BEF07A is the loudest partner.

What is #ac7af0 in CMYK for printing?

cmyk(28%, 49%, 0%, 6%). 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 #ac7af0 warm or cool?

Cool — it scores 69 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #D77AF0; nudged cooler, #7F79F1.

Work with #ac7af0 in the Color Lab