Skip to content

#af2162

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

RGB
175, 33, 98
HSL
333°, 68%, 41%
CMYK
0, 81, 44, 31
Luminance
0.1108

At a glance

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

Hex
#af2162
Hue
333°
magenta / pink
Saturation
68%
vivid
Lightness
41%
dark
Brightness
69%
HSV value
Perceived
41%
weighted brightness
Luminance
0.1108
WCAG relative
Temperature
Warm
32/100 cool
Color family
Magenta / pink
Tone
Vivid
Best ink
White
6.53:1
Closest name
Medium Violet Red
ΔE2000 7.6
Where it sits
Hue333° of 360°
Saturation68%
Lightness41%
Temperature
Warm ← → Cool32% 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#af2162
RGBrgb(175, 33, 98)
HSLhsl(333, 68%, 41%)
CMYKcmyk(0%, 81%, 44%, 31%)
LABlab(39.7 59.3 -1.4)
LCHlch(39.7 59.3 358.6)
OKLCHoklch(0.504 0.182 359.0)
Decimal11477346
Display P3color(display-p3 0.686 0.129 0.384)

Copy-ready code

/* CSS */
color: #af2162;
background-color: #af2162;
/* Tailwind (arbitrary) */
class="text-[#af2162] bg-[#af2162]"
/* SCSS */
$brand: #af2162;
/* SwiftUI */
Color(red: 0.686, green: 0.129, blue: 0.384)
/* Android */
Color.parseColor("#af2162")
/* Flutter */
Color(0xFFAF2162)
/* Python / OpenCV (BGR) */
(98, 33, 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 #af2162 · 6.53:1
Use #ffffffAA at every size, AAA for large text only.
Aa
White text · 6.53:1 · recommended
AA pass · AA large pass · AAA fail
Aa
Black text · 3.22:1
AA fail · AA large pass · AAA fail
Reading the other direction: #af2162 as text scores 6.53:1 on white and 3.22:1 on black.

Accessibility — WCAG contrast

Aa
#af2162 on white: 6.53:1
AA ✓ pass · AA-large · AAA
Aa
#af2162 on black: 3.22:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #434C63
deuteranopia · #6A675F
tritanopia · #BE003F

Color scale — 50 to 950

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

#FBF3F7
#F8E8EF
#F2CADC
#EDA1C4
#E471A6
#DB4288
#CE2773
#af2162
#891A4D
#64173A
#3E0E24
Base = 700Lightest = 50 · #FBF3F7Darkest = 950 · #3E0E24
:root {
  --brand-50: #FBF3F7;
  --brand-100: #F8E8EF;
  --brand-200: #F2CADC;
  --brand-300: #EDA1C4;
  --brand-400: #E471A6;
  --brand-500: #DB4288;
  --brand-600: #CE2773;
  --brand-700: #af2162;
  --brand-800: #891A4D;
  --brand-900: #64173A;
  --brand-950: #3E0E24;
  --brand: #af2162;
  --brand-ink: #ffffff;
}

Colors that work with #af2162

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#FAF4F7
Tinted page background
Border#EDC0D4
Hairlines and dividers
Muted text#9B4B6F
Captions on the surface
Accent#1CB048
Second voice, not a rival
Dark variant#6B143C
Hover, pressed, headers
Light variant#FBEAF2
Selected rows, tints
Dark surface#24141B
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 #af2162

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#21AF6E
Analogous left#AF21A9
Analogous right#AF2721
Split-complement 1#21AF27
Split-complement 2#21A9AF
Triadic 1#62AF21
Triadic 2#2162AF
Tetradic#A9AF21

RGB percentages

Red68.6%
Green12.9%
Blue38.4%

CMYK percentages

Cyan0.0%
Magenta81.1%
Yellow44.0%
Key (black)31.4%

Color previews

#af2162 text on a black background

contrast 3.22:1

Card sample

#af2162 text on a white background

contrast 6.53:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #af2162

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.

#af2162 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

Converts to four-color process without much drama. Proof it anyway.

#af2162, answered

What color is #af2162?

#af2162 is a dark vivid magenta / pink, closest to Medium Violet Red (ΔE2000 7.6). It sits at 333° on the hue wheel with 68% saturation and 41% lightness, which reads as warm.

What is the RGB value of #af2162?

rgb(175, 33, 98) — 175 red, 33 green and 98 blue out of 255, or 68.6% / 12.9% / 38.4% by channel.

Is #af2162 a light or a dark color?

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

Should I use black or white text on #af2162?

White. It scores 6.53:1 against #af2162, versus 3.22:1 for black — AA at any size.

What is the complementary color of #af2162?

#21AF6E sits directly opposite on the wheel. Softer options are the split-complements #21AF27 and #21A9AF, which give the same contrast with far less vibration.

What colors go well with #af2162?

For interface work: #FAF4F7 as the surface, #EDC0D4 for borders, #9B4B6F for secondary text, #1CB048 as an accent and #6B143C for hover and pressed states. For a palette, the analogous pair #AF21A9 and #AF2721 stays calm, while #21AF6E is the loudest partner.

What is #af2162 in CMYK for printing?

cmyk(0%, 81%, 44%, 31%). This is a screen-to-ink approximation — ask your printer for a proof before committing to a run.

Is #af2162 warm or cool?

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

Work with #af2162 in the Color Lab