Skip to content

#af7bfe

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

RGB
175, 123, 254
HSL
264°, 99%, 74%
CMYK
31, 52, 0, 0
Luminance
0.3044

At a glance

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

Hex
#af7bfe
Hue
264°
violet
Saturation
99%
electric
Lightness
74%
light
Brightness
100%
HSV value
Perceived
62%
weighted brightness
Luminance
0.3044
WCAG relative
Temperature
Cool
70/100 cool
Color family
Violet
Tone
Electric
Best ink
Black
7.09:1
Closest name
Medium Purple
ΔE2000 7.1
Where it sits
Hue264° of 360°
Saturation99%
Lightness74%
Temperature
Warm ← → Cool70% 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#af7bfe
RGBrgb(175, 123, 254)
HSLhsl(264, 99%, 74%)
CMYKcmyk(31%, 52%, 0%, 0%)
LABlab(62.0 46.5 -58.2)
LCHlch(62.0 74.4 308.6)
OKLCHoklch(0.692 0.189 299.8)
Decimal11500542
Display P3color(display-p3 0.686 0.482 0.996)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#af7bfe on white: 2.96:1
AA ✗ fail · AA-large · AAA
Aa
#af7bfe on black: 7.09:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #4B96FF
deuteranopia · #5A95FB
tritanopia · #9F94B1

Color scale — 50 to 950

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

#F6F1FE
#EDE3FC
#D8C1FB
#af7bfe
#9A58FE
#7820FD
#6102F3
#5102CA
#4101A2
#320675
#1F0449
Base = 300Lightest = 50 · #F6F1FEDarkest = 950 · #1F0449
:root {
  --brand-50: #F6F1FE;
  --brand-100: #EDE3FC;
  --brand-200: #D8C1FB;
  --brand-300: #af7bfe;
  --brand-400: #9A58FE;
  --brand-500: #7820FD;
  --brand-600: #6102F3;
  --brand-700: #5102CA;
  --brand-800: #4101A2;
  --brand-900: #320675;
  --brand-950: #1F0449;
  --brand: #af7bfe;
  --brand-ink: #000000;
}

Colors that work with #af7bfe

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#F7F4FA
Tinted page background
Border#D2C0ED
Hairlines and dividers
Muted text#6A4B9B
Captions on the surface
Accent#ADCC00
Second voice, not a rival
Dark variant#33017F
Hover, pressed, headers
Light variant#F0E6FF
Selected rows, tints
Dark surface#1A1424
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 #af7bfe

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#CAFE7B
Analogous left#7B88FE
Analogous right#F07BFE
Split-complement 1#FEF07B
Split-complement 2#88FE7B
Triadic 1#FEAF7B
Triadic 2#7BFEAF
Tetradic#FE7B88

RGB percentages

Red68.6%
Green48.2%
Blue99.6%

CMYK percentages

Cyan31.1%
Magenta51.6%
Yellow0.0%
Key (black)0.4%

Color previews

#af7bfe text on a black background

contrast 7.09:1

Card sample

#af7bfe text on a white background

contrast 2.96:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #af7bfe

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.

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

#af7bfe, answered

What color is #af7bfe?

#af7bfe is a light electric violet, closest to Medium Purple (ΔE2000 7.1). It sits at 264° on the hue wheel with 99% saturation and 74% lightness, which reads as cool.

What is the RGB value of #af7bfe?

rgb(175, 123, 254) — 175 red, 123 green and 254 blue out of 255, or 68.6% / 48.2% / 99.6% by channel.

Is #af7bfe a light or a dark color?

It is a mid-tone. Relative luminance is 0.3044 and perceived brightness is 62%, so black text on it reaches 7.09:1.

Should I use black or white text on #af7bfe?

Black. It scores 7.09:1 against #af7bfe, versus 2.96:1 for white — AAA at any size.

What is the complementary color of #af7bfe?

#CAFE7B sits directly opposite on the wheel. Softer options are the split-complements #FEF07B and #88FE7B, which give the same contrast with far less vibration.

What colors go well with #af7bfe?

For interface work: #F7F4FA as the surface, #D2C0ED for borders, #6A4B9B for secondary text, #ADCC00 as an accent and #33017F for hover and pressed states. For a palette, the analogous pair #7B88FE and #F07BFE stays calm, while #CAFE7B is the loudest partner.

What is #af7bfe in CMYK for printing?

cmyk(31%, 52%, 0%, 0%). 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 #af7bfe warm or cool?

Cool — it scores 70 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #DF7BFE; nudged cooler, #7E7AFF.

Work with #af7bfe in the Color Lab