Skip to content

#af8cf7

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

RGB
175, 140, 247
HSL
260°, 87%, 76%
CMYK
29, 43, 0, 3
Luminance
0.3459

At a glance

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

Hex
#af8cf7
Hue
260°
violet
Saturation
87%
electric
Lightness
76%
light
Brightness
97%
HSV value
Perceived
65%
weighted brightness
Luminance
0.3459
WCAG relative
Temperature
Cool
72/100 cool
Color family
Violet
Tone
Electric
Best ink
Black
7.92:1
Closest name
Medium Purple
ΔE2000 9.2
Where it sits
Hue260° of 360°
Saturation87%
Lightness76%
Temperature
Warm ← → Cool72% 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#af8cf7
RGBrgb(175, 140, 247)
HSLhsl(260, 87%, 76%)
CMYKcmyk(29%, 43%, 0%, 3%)
LABlab(65.4 35.4 -48.9)
LCHlch(65.4 60.4 305.9)
OKLCHoklch(0.716 0.154 297.4)
Decimal11504887
Display P3color(display-p3 0.686 0.549 0.969)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#af8cf7 on white: 2.65:1
AA ✗ fail · AA-large · AAA
Aa
#af8cf7 on black: 7.92:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #6C9FFB
deuteranopia · #739EF4
tritanopia · #A09FB6

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #af8cf7 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.

#F6F2FD
#ECE5FA
#D5C4F7
#af8cf7
#9162F4
#6D2DF0
#5510E5
#470DBF
#390B99
#2C0C6E
#1C0845
Base = 300Lightest = 50 · #F6F2FDDarkest = 950 · #1C0845
:root {
  --brand-50: #F6F2FD;
  --brand-100: #ECE5FA;
  --brand-200: #D5C4F7;
  --brand-300: #af8cf7;
  --brand-400: #9162F4;
  --brand-500: #6D2DF0;
  --brand-600: #5510E5;
  --brand-700: #470DBF;
  --brand-800: #390B99;
  --brand-900: #2C0C6E;
  --brand-950: #1C0845;
  --brand: #af8cf7;
  --brand-ink: #000000;
}

Colors that work with #af8cf7

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#CEC0ED
Hairlines and dividers
Muted text#654B9B
Captions on the surface
Accent#B5C20A
Second voice, not a rival
Dark variant#2D0877
Hover, pressed, headers
Light variant#EEE7FD
Selected rows, tints
Dark surface#191424
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 #af8cf7

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#D4F78C
Analogous left#8C9FF7
Analogous right#E48CF7
Split-complement 1#F7E48C
Split-complement 2#9FF78C
Triadic 1#F7AF8C
Triadic 2#8CF7AF
Tetradic#F78C9F

RGB percentages

Red68.6%
Green54.9%
Blue96.9%

CMYK percentages

Cyan29.1%
Magenta43.3%
Yellow0.0%
Key (black)3.1%

Color previews

#af8cf7 text on a black background

contrast 7.92:1

Card sample

#af8cf7 text on a white background

contrast 2.65:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #af8cf7

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.

#af8cf7 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
SurfacesBadgesHighlightsEmpty states
Print note

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

#af8cf7, answered

What color is #af8cf7?

#af8cf7 is a light electric violet, closest to Medium Purple (ΔE2000 9.2). It sits at 260° on the hue wheel with 87% saturation and 76% lightness, which reads as cool.

What is the RGB value of #af8cf7?

rgb(175, 140, 247) — 175 red, 140 green and 247 blue out of 255, or 68.6% / 54.9% / 96.9% by channel.

Is #af8cf7 a light or a dark color?

It is a mid-tone. Relative luminance is 0.3459 and perceived brightness is 65%, so black text on it reaches 7.92:1.

Should I use black or white text on #af8cf7?

Black. It scores 7.92:1 against #af8cf7, versus 2.65:1 for white — AAA at any size.

What is the complementary color of #af8cf7?

#D4F78C sits directly opposite on the wheel. Softer options are the split-complements #F7E48C and #9FF78C, which give the same contrast with far less vibration.

What colors go well with #af8cf7?

For interface work: #F6F4FA as the surface, #CEC0ED for borders, #654B9B for secondary text, #B5C20A as an accent and #2D0877 for hover and pressed states. For a palette, the analogous pair #8C9FF7 and #E48CF7 stays calm, while #D4F78C is the loudest partner.

What is #af8cf7 in CMYK for printing?

cmyk(29%, 43%, 0%, 3%). 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 #af8cf7 warm or cool?

Cool — it scores 72 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #D68CF7; nudged cooler, #8B8FF8.

Work with #af8cf7 in the Color Lab