Skip to content

#ab5dfb

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

RGB
171, 93, 251
HSL
270°, 95%, 68%
CMYK
32, 63, 0, 2
Luminance
0.2345

At a glance

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

Hex
#ab5dfb
Hue
270°
violet
Saturation
95%
electric
Lightness
68%
light
Brightness
98%
HSV value
Perceived
57%
weighted brightness
Luminance
0.2345
WCAG relative
Temperature
Cool
67/100 cool
Color family
Violet
Tone
Electric
Best ink
Black
5.69:1
Closest name
Medium Purple
ΔE2000 7
Where it sits
Hue270° of 360°
Saturation95%
Lightness68%
Temperature
Warm ← → Cool67% 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#ab5dfb
RGBrgb(171, 93, 251)
HSLhsl(270, 95%, 68%)
CMYKcmyk(32%, 63%, 0%, 2%)
LABlab(55.5 60.4 -66.9)
LCHlch(55.5 90.2 312.1)
OKLCHoklch(0.643 0.227 303.3)
Decimal11230715
Display P3color(display-p3 0.671 0.365 0.984)

Copy-ready code

/* CSS */
color: #ab5dfb;
background-color: #ab5dfb;
/* Tailwind (arbitrary) */
class="text-[#ab5dfb] bg-[#ab5dfb]"
/* SCSS */
$brand: #ab5dfb;
/* SwiftUI */
Color(red: 0.671, green: 0.365, blue: 0.984)
/* Android */
Color.parseColor("#ab5dfb")
/* Flutter */
Color(0xFFAB5DFB)
/* Python / OpenCV (BGR) */
(251, 93, 171)

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 #ab5dfb · 5.69:1
Use #000000AA at every size, AAA for large text only.
Aa
White text · 3.69:1
AA fail · AA large pass · AAA fail
Aa
Black text · 5.69:1 · recommended
AA pass · AA large pass · AAA fail
Reading the other direction: #ab5dfb as text scores 3.69:1 on white and 5.69:1 on black.

Accessibility — WCAG contrast

Aa
#ab5dfb on white: 3.69:1
AA ✗ fail · AA-large · AAA
Aa
#ab5dfb on black: 5.69:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #0083FF
deuteranopia · #2B85F8
tritanopia · #9C7FA4

Color scale — 50 to 950

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

#F7F1FD
#F0E4FC
#DDC2FA
#C691FC
#ab5dfb
#8D24FA
#7906EF
#6505C7
#51049F
#3C0873
#260548
Base = 400Lightest = 50 · #F7F1FDDarkest = 950 · #260548
:root {
  --brand-50: #F7F1FD;
  --brand-100: #F0E4FC;
  --brand-200: #DDC2FA;
  --brand-300: #C691FC;
  --brand-400: #ab5dfb;
  --brand-500: #8D24FA;
  --brand-600: #7906EF;
  --brand-700: #6505C7;
  --brand-800: #51049F;
  --brand-900: #3C0873;
  --brand-950: #260548;
  --brand: #ab5dfb;
  --brand-ink: #000000;
}

Colors that work with #ab5dfb

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#D6C0ED
Hairlines and dividers
Muted text#724B9B
Captions on the surface
Accent#9ACB01
Second voice, not a rival
Dark variant#3F037C
Hover, pressed, headers
Light variant#F2E6FE
Selected rows, tints
Dark surface#1C1424
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 #ab5dfb

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

Works well for
  • Headings from 24px up on white
  • 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
  • Small text on white — under 4.5:1
  • 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#ADFB5D
Analogous left#5D5EFB
Analogous right#FA5DFB
Split-complement 1#FBFA5D
Split-complement 2#5EFB5D
Triadic 1#FBAB5D
Triadic 2#5DFBAB
Tetradic#FB5D5E

RGB percentages

Red67.1%
Green36.5%
Blue98.4%

CMYK percentages

Cyan31.9%
Magenta62.9%
Yellow0.0%
Key (black)1.6%

Color previews

#ab5dfb text on a black background

contrast 5.69:1

Card sample

#ab5dfb text on a white background

contrast 3.69:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(171, 93, 251, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(171, 93, 251, 0.45);
Border & gradient
Gradient panel
border: 3px solid #ab5dfb;
background: linear-gradient(135deg, #ab5dfb, #FB5DE2);

Monochromatic scale

Palettes built from #ab5dfb

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.

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

#ab5dfb, answered

What color is #ab5dfb?

#ab5dfb is a light electric violet, closest to Medium Purple (ΔE2000 7). It sits at 270° on the hue wheel with 95% saturation and 68% lightness, which reads as cool.

What is the RGB value of #ab5dfb?

rgb(171, 93, 251) — 171 red, 93 green and 251 blue out of 255, or 67.1% / 36.5% / 98.4% by channel.

Is #ab5dfb a light or a dark color?

It is a mid-tone. Relative luminance is 0.2345 and perceived brightness is 57%, so black text on it reaches 5.69:1.

Should I use black or white text on #ab5dfb?

Black. It scores 5.69:1 against #ab5dfb, versus 3.69:1 for white — AA at any size.

What is the complementary color of #ab5dfb?

#ADFB5D sits directly opposite on the wheel. Softer options are the split-complements #FBFA5D and #5EFB5D, which give the same contrast with far less vibration.

What colors go well with #ab5dfb?

For interface work: #F7F4FA as the surface, #D6C0ED for borders, #724B9B for secondary text, #9ACB01 as an accent and #3F037C for hover and pressed states. For a palette, the analogous pair #5D5EFB and #FA5DFB stays calm, while #ADFB5D is the loudest partner.

What is #ab5dfb in CMYK for printing?

cmyk(32%, 63%, 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 #ab5dfb warm or cool?

Cool — it scores 67 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #E55DFB; nudged cooler, #705CFD.

Work with #ab5dfb in the Color Lab