Skip to content

#af97fa

a light, electric blue · cool · closest name: Medium Purple

RGB
175, 151, 250
HSL
255°, 91%, 79%
CMYK
30, 40, 0, 2
Luminance
0.3815

At a glance

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

Hex
#af97fa
Hue
255°
blue
Saturation
91%
electric
Lightness
79%
light
Brightness
98%
HSV value
Perceived
68%
weighted brightness
Luminance
0.3815
WCAG relative
Temperature
Cool
75/100 cool
Color family
Blue
Tone
Electric
Best ink
Black
8.63:1
Closest name
Medium Purple
ΔE2000 11.6
Where it sits
Hue255° of 360°
Saturation91%
Lightness79%
Temperature
Warm ← → Cool75% 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#af97fa
RGBrgb(175, 151, 250)
HSLhsl(255, 91%, 79%)
CMYKcmyk(30%, 40%, 0%, 2%)
LABlab(68.1 29.9 -46.3)
LCHlch(68.1 55.1 302.9)
OKLCHoklch(0.737 0.142 293.8)
Decimal11507706
Display P3color(display-p3 0.686 0.592 0.980)

Copy-ready code

/* CSS */
color: #af97fa;
background-color: #af97fa;
/* Tailwind (arbitrary) */
class="text-[#af97fa] bg-[#af97fa]"
/* SCSS */
$brand: #af97fa;
/* SwiftUI */
Color(red: 0.686, green: 0.592, blue: 0.980)
/* Android */
Color.parseColor("#af97fa")
/* Flutter */
Color(0xFFAF97FA)
/* Python / OpenCV (BGR) */
(250, 151, 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#000000 on #af97fa · 8.63:1
Use #000000AAA at every size.
Aa
White text · 2.43:1
AA fail · AA large fail · AAA fail
Aa
Black text · 8.63:1 · recommended
AA pass · AA large pass · AAA pass
Reading the other direction: #af97fa as text scores 2.43:1 on white and 8.63:1 on black.

Accessibility — WCAG contrast

Aa
#af97fa on white: 2.43:1
AA ✗ fail · AA-large · AAA
Aa
#af97fa on black: 8.63:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #7AA7FE
deuteranopia · #7DA4F8
tritanopia · #9EA9BD

Color scale — 50 to 950

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

#F4F2FD
#EAE5FB
#D0C3F9
#af97fa
#835EF7
#5A29F5
#410BEA
#3609C3
#2B089C
#230A70
#160646
Base = 300Lightest = 50 · #F4F2FDDarkest = 950 · #160646
:root {
  --brand-50: #F4F2FD;
  --brand-100: #EAE5FB;
  --brand-200: #D0C3F9;
  --brand-300: #af97fa;
  --brand-400: #835EF7;
  --brand-500: #5A29F5;
  --brand-600: #410BEA;
  --brand-700: #3609C3;
  --brand-800: #2B089C;
  --brand-900: #230A70;
  --brand-950: #160646;
  --brand: #af97fa;
  --brand-ink: #000000;
}

Colors that work with #af97fa

Not a palette — a role sheet. Each swatch answers one question you will hit while building the component.

Text on it#000000
Black wins here
Surface#F6F4FA
Tinted page background
Border#CBC0ED
Hairlines and dividers
Muted text#5E4B9B
Captions on the surface
Accent#C6C406
Second voice, not a rival
Dark variant#22067A
Hover, pressed, headers
Light variant#ECE7FE
Selected rows, tints
Dark surface#181424
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 #af97fa

Derived from its contrast, chroma and lightness — not from taste.

Works well for
  • Text and icons on dark surfaces
  • Primary buttons and calls to action
  • Focus rings, active and selected states
  • Card and section backgrounds
  • Brand accents, badges and data highlights
Use with care
  • Text of any size on white — fails WCAG AA
  • Full-page backgrounds — tiring over long sessions
  • White 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#E2FA97
Analogous left#97B0FA
Analogous right#E097FA
Split-complement 1#FAE097
Split-complement 2#B0FA97
Triadic 1#FAAF97
Triadic 2#97FAAF
Tetradic#FA97B0

RGB percentages

Red68.6%
Green59.2%
Blue98.0%

CMYK percentages

Cyan30.0%
Magenta39.6%
Yellow0.0%
Key (black)2.0%

Color previews

#af97fa text on a black background

contrast 8.63:1

Card sample

#af97fa text on a white background

contrast 2.43:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #af97fa

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.

#af97fa in the real world

Where a color in this family tends to land, and the interface roles it is usually asked to play.

Industries
TechnologyFinanceHealthcareEnterprise SaaS
Common UI roles
SurfacesBadgesHighlightsEmpty states
Print note

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

#af97fa, answered

What color is #af97fa?

#af97fa is a light electric blue, closest to Medium Purple (ΔE2000 11.6). It sits at 255° on the hue wheel with 91% saturation and 79% lightness, which reads as cool.

What is the RGB value of #af97fa?

rgb(175, 151, 250) — 175 red, 151 green and 250 blue out of 255, or 68.6% / 59.2% / 98% by channel.

Is #af97fa a light or a dark color?

It is a mid-tone. Relative luminance is 0.3815 and perceived brightness is 68%, so black text on it reaches 8.63:1.

Should I use black or white text on #af97fa?

Black. It scores 8.63:1 against #af97fa, versus 2.43:1 for white — AAA at any size.

What is the complementary color of #af97fa?

#E2FA97 sits directly opposite on the wheel. Softer options are the split-complements #FAE097 and #B0FA97, which give the same contrast with far less vibration.

What colors go well with #af97fa?

For interface work: #F6F4FA as the surface, #CBC0ED for borders, #5E4B9B for secondary text, #C6C406 as an accent and #22067A for hover and pressed states. For a palette, the analogous pair #97B0FA and #E097FA stays calm, while #E2FA97 is the loudest partner.

What is #af97fa in CMYK for printing?

cmyk(30%, 40%, 0%, 2%). 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 #af97fa warm or cool?

Cool — it scores 75 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #D397FA; nudged cooler, #96A2FB.

Work with #af97fa in the Color Lab