#af018c
a dark, electric magenta / pink · neutral · closest name: Medium Violet Red
At a glance
Every number on this page in one read: what #af018c is made of, how bright it looks, and which way it leans.
Reads neutral. Warm and cool siblings keep the same lightness, so you can swap one in without redoing your contrast maths.
Every format
| HEX | #af018c |
| RGB | rgb(175, 1, 140) |
| HSL | hsl(312, 99%, 35%) |
| CMYK | cmyk(0%, 99%, 20%, 31%) |
| LAB | lab(39.6 69.2 -27.8) |
| LCH | lch(39.6 74.5 338.1) |
| OKLCH | oklch(0.509 0.221 340.1) |
| Decimal | 11469196 |
| Display P3 | color(display-p3 0.686 0.004 0.549) |
Copy-ready code
/* CSS */
color: #af018c;
background-color: #af018c;
/* Tailwind (arbitrary) */
class="text-[#af018c] bg-[#af018c]"
/* SCSS */
$brand: #af018c;
/* SwiftUI */
Color(red: 0.686, green: 0.004, blue: 0.549)
/* Android */
Color.parseColor("#af018c")
/* Flutter */
Color(0xFFAF018C)
/* Python / OpenCV (BGR) */
(140, 1, 175)Best text color
Only one of black and white can be right. This is the one, with the number that proves it.
Accessibility — WCAG contrast
Color scale — 50 to 950
A Tailwind-shaped ramp built around this exact hex. #af018c 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.
:root {
--brand-50: #FEF1FB;
--brand-100: #FCE3F7;
--brand-200: #FBC0EF;
--brand-300: #FE8FE8;
--brand-400: #FE58DD;
--brand-500: #FE20D1;
--brand-600: #F301C3;
--brand-700: #CB01A2;
--brand-800: #af018c;
--brand-900: #75065E;
--brand-950: #49033B;
--brand: #af018c;
--brand-ink: #ffffff;
}Colors that work with #af018c
Not a palette — a role sheet. Each swatch answers one question you will hit while building the component.
Surface, border, heading and body all derive from this one hue, so the screen stays coherent without a second palette.
Lightness flips, hue holds. The accent stays the anchor in both themes.
How to use #af018c
Derived from its contrast, chroma and lightness — not from taste.
- ✓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
- ⚠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 | #01AF24 | Directly opposite — maximum tension | |
| Analogous left | #7B01AF | Neighbour, quieter | |
| Analogous right | #AF0135 | Neighbour, quieter | |
| Split-complement 1 | #35AF01 | Contrast without the clash | |
| Split-complement 2 | #01AF7B | Contrast without the clash | |
| Triadic 1 | #8CAF01 | Even thirds — balanced and loud | |
| Triadic 2 | #018CAF | Even thirds — balanced and loud | |
| Tetradic | #AF7B01 | Fourth corner of the square scheme |
RGB percentages
CMYK percentages
Color previews
#af018c text on a black background
contrast 3.21:1
#af018c text on a white background
contrast 6.55:1
CSS3 live lab
The quick brown fox
color: #af018c;
background-color: #af018c;
Glowing headline
text-shadow: 2px 2px 8px #af018c;
Soft neon halo
text-shadow: 0 0 14px rgba(175, 1, 140, 0.45);
box-shadow: 0 12px 32px -8px rgba(175, 1, 140, 0.45);
border: 3px solid #af018c; background: linear-gradient(135deg, #af018c, #AF0118);
Monochromatic scale
Palettes built from #af018c
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.
Closest color with a full write-up: Plum (#8e4585) — ΔE2000 8.5 away, with its history, psychology and brand usage.
#af018c in the real world
Where a color in this family tends to land, and the interface roles it is usually asked to play.
Sits outside most CMYK gamuts — expect a duller press result, or specify a spot ink.
#af018c, answered
What color is #af018c?
#af018c is a dark electric magenta / pink, closest to Medium Violet Red (ΔE2000 6.8). It sits at 312° on the hue wheel with 99% saturation and 35% lightness, which reads as neutral.
What is the RGB value of #af018c?
rgb(175, 1, 140) — 175 red, 1 green and 140 blue out of 255, or 68.6% / 0.4% / 54.9% by channel.
Is #af018c a light or a dark color?
It is a dark color. Relative luminance is 0.1103 and perceived brightness is 42%, so white text on it reaches 6.55:1.
Should I use black or white text on #af018c?
White. It scores 6.55:1 against #af018c, versus 3.21:1 for black — AA at any size.
What is the complementary color of #af018c?
#01AF24 sits directly opposite on the wheel. Softer options are the split-complements #35AF01 and #01AF7B, which give the same contrast with far less vibration.
What colors go well with #af018c?
For interface work: #FAF4F9 as the surface, #EDC0E4 for borders, #9B4B8B for secondary text, #0BCC00 as an accent and #7F0165 for hover and pressed states. For a palette, the analogous pair #7B01AF and #AF0135 stays calm, while #01AF24 is the loudest partner.
What is #af018c in CMYK for printing?
cmyk(0%, 99%, 20%, 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 #af018c warm or cool?
Neutral — it scores 43 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #AF014C; nudged cooler, #9300B0.