Skip to content

#af017c

a dark, electric magenta / pink · warm · closest name: Medium Violet Red

RGB
175, 1, 124
HSL
318°, 99%, 35%
CMYK
0, 99, 29, 31
Luminance
0.1059

At a glance

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

Hex
#af017c
Hue
318°
magenta / pink
Saturation
99%
electric
Lightness
35%
dark
Brightness
69%
HSV value
Perceived
41%
weighted brightness
Luminance
0.1059
WCAG relative
Temperature
Warm
40/100 cool
Color family
Magenta / pink
Tone
Electric
Best ink
White
6.73:1
Closest name
Medium Violet Red
ΔE2000 5.7
Where it sits
Hue318° of 360°
Saturation99%
Lightness35%
Temperature
Warm ← → Cool40% cool

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

Every format

HEX#af017c
RGBrgb(175, 1, 124)
HSLhsl(318, 99%, 35%)
CMYKcmyk(0%, 99%, 29%, 31%)
LABlab(38.9 67.3 -19.0)
LCHlch(38.9 69.9 344.2)
OKLCHoklch(0.501 0.212 346.2)
Decimal11469180
Display P3color(display-p3 0.686 0.004 0.486)

Copy-ready code

/* CSS */
color: #af017c;
background-color: #af017c;
/* Tailwind (arbitrary) */
class="text-[#af017c] bg-[#af017c]"
/* SCSS */
$brand: #af017c;
/* SwiftUI */
Color(red: 0.686, green: 0.004, blue: 0.486)
/* Android */
Color.parseColor("#af017c")
/* Flutter */
Color(0xFFAF017C)
/* Python / OpenCV (BGR) */
(124, 1, 175)

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 #af017c · 6.73:1
Use #ffffffAA at every size, AAA for large text only.
Aa
White text · 6.73:1 · recommended
AA pass · AA large pass · AAA fail
Aa
Black text · 3.12:1
AA fail · AA large pass · AAA fail
Reading the other direction: #af017c as text scores 6.73:1 on white and 3.12:1 on black.

Accessibility — WCAG contrast

Aa
#af017c on white: 6.73:1
AA ✓ pass · AA-large · AAA
Aa
#af017c on black: 3.12:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #2B4A7E
deuteranopia · #5E6579
tritanopia · #BC0047

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #af017c 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.

#FEF1FA
#FCE3F5
#FBC0EA
#FE8FDE
#FE58CD
#FE20BD
#F301AC
#CB0190
#af017c
#750654
#490335
Base = 800Lightest = 50 · #FEF1FADarkest = 950 · #490335
:root {
  --brand-50: #FEF1FA;
  --brand-100: #FCE3F5;
  --brand-200: #FBC0EA;
  --brand-300: #FE8FDE;
  --brand-400: #FE58CD;
  --brand-500: #FE20BD;
  --brand-600: #F301AC;
  --brand-700: #CB0190;
  --brand-800: #af017c;
  --brand-900: #750654;
  --brand-950: #490335;
  --brand: #af017c;
  --brand-ink: #ffffff;
}

Colors that work with #af017c

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#FAF4F9
Tinted page background
Border#EDC0DF
Hairlines and dividers
Muted text#9B4B83
Captions on the surface
Accent#00CC09
Second voice, not a rival
Dark variant#7F015A
Hover, pressed, headers
Light variant#FFE6F7
Selected rows, tints
Dark surface#241420
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 #af017c

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#01AF34
Analogous left#8B01AF
Analogous right#AF0125
Split-complement 1#25AF01
Split-complement 2#01AF8B
Triadic 1#7CAF01
Triadic 2#017CAF
Tetradic#AF8B01

RGB percentages

Red68.6%
Green0.4%
Blue48.6%

CMYK percentages

Cyan0.0%
Magenta99.4%
Yellow29.1%
Key (black)31.4%

Color previews

#af017c text on a black background

contrast 3.12:1

Card sample

#af017c text on a white background

contrast 6.73:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(175, 1, 124, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(175, 1, 124, 0.45);
Border & gradient
Gradient panel
border: 3px solid #af017c;
background: linear-gradient(135deg, #af017c, #AF0108);

Monochromatic scale

Palettes built from #af017c

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.

#af017c 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.

#af017c, answered

What color is #af017c?

#af017c is a dark electric magenta / pink, closest to Medium Violet Red (ΔE2000 5.7). It sits at 318° on the hue wheel with 99% saturation and 35% lightness, which reads as warm.

What is the RGB value of #af017c?

rgb(175, 1, 124) — 175 red, 1 green and 124 blue out of 255, or 68.6% / 0.4% / 48.6% by channel.

Is #af017c a light or a dark color?

It is a dark color. Relative luminance is 0.1059 and perceived brightness is 41%, so white text on it reaches 6.73:1.

Should I use black or white text on #af017c?

White. It scores 6.73:1 against #af017c, versus 3.12:1 for black — AA at any size.

What is the complementary color of #af017c?

#01AF34 sits directly opposite on the wheel. Softer options are the split-complements #25AF01 and #01AF8B, which give the same contrast with far less vibration.

What colors go well with #af017c?

For interface work: #FAF4F9 as the surface, #EDC0DF for borders, #9B4B83 for secondary text, #00CC09 as an accent and #7F015A for hover and pressed states. For a palette, the analogous pair #8B01AF and #AF0125 stays calm, while #01AF34 is the loudest partner.

What is #af017c in CMYK for printing?

cmyk(0%, 99%, 29%, 31%). 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 #af017c warm or cool?

Warm — it scores 40 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #AF013C; nudged cooler, #A300B0.

Work with #af017c in the Color Lab