Skip to content

#af02fd

a balanced, electric violet · cool · closest name: Blue Violet

RGB
175, 2, 253
HSL
281°, 98%, 50%
CMYK
31, 99, 0, 1
Luminance
0.1625

At a glance

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

Hex
#af02fd
Hue
281°
violet
Saturation
98%
electric
Lightness
50%
balanced
Brightness
99%
HSV value
Perceived
50%
weighted brightness
Luminance
0.1625
WCAG relative
Temperature
Cool
60/100 cool
Color family
Violet
Tone
Electric
Best ink
White
4.94:1
Closest name
Blue Violet
ΔE2000 6.3
Where it sits
Hue281° of 360°
Saturation98%
Lightness50%
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#af02fd
RGBrgb(175, 2, 253)
HSLhsl(281, 98%, 50%)
CMYKcmyk(31%, 99%, 0%, 1%)
LABlab(47.3 87.0 -81.4)
LCHlch(47.3 119.2 316.9)
OKLCHoklch(0.587 0.298 308.9)
Decimal11469565
Display P3color(display-p3 0.686 0.008 0.992)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#af02fd on white: 4.94:1
AA ✓ pass · AA-large · AAA
Aa
#af02fd on black: 4.25:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #006BFF
deuteranopia · #0072F9
tritanopia · #A25E95

Color scale — 50 to 950

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

#FAF1FE
#F4E3FC
#E9C1FB
#DC90FE
#CA58FE
#B920FD
#af02fd
#8C02CA
#7001A2
#520675
#330449
Base = 600Lightest = 50 · #FAF1FEDarkest = 950 · #330449
:root {
  --brand-50: #FAF1FE;
  --brand-100: #F4E3FC;
  --brand-200: #E9C1FB;
  --brand-300: #DC90FE;
  --brand-400: #CA58FE;
  --brand-500: #B920FD;
  --brand-600: #af02fd;
  --brand-700: #8C02CA;
  --brand-800: #7001A2;
  --brand-900: #520675;
  --brand-950: #330449;
  --brand: #af02fd;
  --brand-ink: #ffffff;
}

Colors that work with #af02fd

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#72CC00
Second voice, not a rival
Dark variant#58017E
Hover, pressed, headers
Light variant#F7E6FF
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 #af02fd

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#50FD02
Analogous left#3202FD
Analogous right#FD02CD
Split-complement 1#CDFD02
Split-complement 2#02FD32
Triadic 1#FDAF02
Triadic 2#02FDAF
Tetradic#FD3202

RGB percentages

Red68.6%
Green0.8%
Blue99.2%

CMYK percentages

Cyan30.8%
Magenta99.2%
Yellow0.0%
Key (black)0.8%

Color previews

#af02fd text on a black background

contrast 4.25:1

Card sample

#af02fd text on a white background

contrast 4.94:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #af02fd

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.

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

#af02fd, answered

What color is #af02fd?

#af02fd is a balanced electric violet, closest to Blue Violet (ΔE2000 6.3). It sits at 281° on the hue wheel with 98% saturation and 50% lightness, which reads as cool.

What is the RGB value of #af02fd?

rgb(175, 2, 253) — 175 red, 2 green and 253 blue out of 255, or 68.6% / 0.8% / 99.2% by channel.

Is #af02fd a light or a dark color?

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

Should I use black or white text on #af02fd?

White. It scores 4.94:1 against #af02fd, versus 4.25:1 for black — AA at any size.

What is the complementary color of #af02fd?

#50FD02 sits directly opposite on the wheel. Softer options are the split-complements #CDFD02 and #02FD32, which give the same contrast with far less vibration.

What colors go well with #af02fd?

For interface work: #F9F4FA as the surface, #DFC0ED for borders, #824B9B for secondary text, #72CC00 as an accent and #58017E for hover and pressed states. For a palette, the analogous pair #3202FD and #FD02CD stays calm, while #50FD02 is the loudest partner.

What is #af02fd in CMYK for printing?

cmyk(31%, 99%, 0%, 1%). 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 #af02fd 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 #FD02EF; nudged cooler, #5200FF.

Work with #af02fd in the Color Lab