Skip to content

#af17f2

a balanced, electric violet · cool · closest name: Dark Orchid

RGB
175, 23, 242
HSL
282°, 89%, 52%
CMYK
28, 91, 0, 5
Luminance
0.1614

At a glance

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

Hex
#af17f2
Hue
282°
violet
Saturation
89%
electric
Lightness
52%
balanced
Brightness
95%
HSV value
Perceived
50%
weighted brightness
Luminance
0.1614
WCAG relative
Temperature
Cool
60/100 cool
Color family
Violet
Tone
Electric
Best ink
White
4.97:1
Closest name
Dark Orchid
ΔE2000 5.6
Where it sits
Hue282° of 360°
Saturation89%
Lightness52%
Temperature
Warm ← → Cool60% 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#af17f2
RGBrgb(175, 23, 242)
HSLhsl(282, 89%, 52%)
CMYKcmyk(28%, 91%, 0%, 5%)
LABlab(47.2 82.8 -75.5)
LCHlch(47.2 112.0 317.6)
OKLCHoklch(0.583 0.284 310.8)
Decimal11474930
Display P3color(display-p3 0.686 0.090 0.949)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#af17f2 on white: 4.97:1
AA ✓ pass · AA-large · AAA
Aa
#af17f2 on black: 4.23:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #006AF7
deuteranopia · #0072EE
tritanopia · #A65B90

Color scale — 50 to 950

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

#F9F2FD
#F4E5FB
#E8C4F8
#DA95F9
#C860F6
#af17f2
#A50DE8
#890BC1
#6E099B
#510B70
#320746
Base = 500Lightest = 50 · #F9F2FDDarkest = 950 · #320746
:root {
  --brand-50: #F9F2FD;
  --brand-100: #F4E5FB;
  --brand-200: #E8C4F8;
  --brand-300: #DA95F9;
  --brand-400: #C860F6;
  --brand-500: #af17f2;
  --brand-600: #A50DE8;
  --brand-700: #890BC1;
  --brand-800: #6E099B;
  --brand-900: #510B70;
  --brand-950: #320746;
  --brand: #af17f2;
  --brand-ink: #ffffff;
}

Colors that work with #af17f2

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#F9F4FA
Tinted page background
Border#DFC0ED
Hairlines and dividers
Muted text#824B9B
Captions on the surface
Accent#71C507
Second voice, not a rival
Dark variant#560779
Hover, pressed, headers
Light variant#F7E7FE
Selected rows, tints
Dark surface#1F1424
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 #af17f2

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
  • Brand accents, badges and data highlights
Use with care
  • Full-page backgrounds — tiring over long sessions
  • 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#5AF217
Analogous left#4117F2
Analogous right#F217C8
Split-complement 1#C8F217
Split-complement 2#17F241
Triadic 1#F2AF17
Triadic 2#17F2AF
Tetradic#F24117

RGB percentages

Red68.6%
Green9.0%
Blue94.9%

CMYK percentages

Cyan27.7%
Magenta90.5%
Yellow0.0%
Key (black)5.1%

Color previews

#af17f2 text on a black background

contrast 4.23:1

Card sample

#af17f2 text on a white background

contrast 4.97:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #af17f2

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.

#af17f2 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
ButtonsLinksFocus statesCharts
Print note

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

#af17f2, answered

What color is #af17f2?

#af17f2 is a balanced electric violet, closest to Dark Orchid (ΔE2000 5.6). It sits at 282° on the hue wheel with 89% saturation and 52% lightness, which reads as cool.

What is the RGB value of #af17f2?

rgb(175, 23, 242) — 175 red, 23 green and 242 blue out of 255, or 68.6% / 9% / 94.9% by channel.

Is #af17f2 a light or a dark color?

It is a dark color. Relative luminance is 0.1614 and perceived brightness is 50%, so white text on it reaches 4.97:1.

Should I use black or white text on #af17f2?

White. It scores 4.97:1 against #af17f2, versus 4.23:1 for black — AA at any size.

What is the complementary color of #af17f2?

#5AF217 sits directly opposite on the wheel. Softer options are the split-complements #C8F217 and #17F241, which give the same contrast with far less vibration.

What colors go well with #af17f2?

For interface work: #F9F4FA as the surface, #DFC0ED for borders, #824B9B for secondary text, #71C507 as an accent and #560779 for hover and pressed states. For a palette, the analogous pair #4117F2 and #F217C8 stays calm, while #5AF217 is the loudest partner.

What is #af17f2 in CMYK for printing?

cmyk(28%, 91%, 0%, 5%). 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 #af17f2 warm or cool?

Cool — it scores 60 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #F217E5; nudged cooler, #5E15F4.

Work with #af17f2 in the Color Lab