Skip to content

#ab2dfb

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

RGB
171, 45, 251
HSL
277°, 96%, 58%
CMYK
32, 82, 0, 2
Luminance
0.1750

At a glance

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

Hex
#ab2dfb
Hue
277°
violet
Saturation
96%
electric
Lightness
58%
balanced
Brightness
98%
HSV value
Perceived
51%
weighted brightness
Luminance
0.1750
WCAG relative
Temperature
Cool
63/100 cool
Color family
Violet
Tone
Electric
Best ink
White
4.67:1
Closest name
Blue Violet
ΔE2000 6.8
Where it sits
Hue277° of 360°
Saturation96%
Lightness58%
Temperature
Warm ← → Cool63% 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#ab2dfb
RGBrgb(171, 45, 251)
HSLhsl(277, 96%, 58%)
CMYKcmyk(32%, 82%, 0%, 2%)
LABlab(48.9 79.2 -77.7)
LCHlch(48.9 111.0 315.5)
OKLCHoklch(0.596 0.277 307.0)
Decimal11218427
Display P3color(display-p3 0.671 0.176 0.984)

Copy-ready code

/* CSS */
color: #ab2dfb;
background-color: #ab2dfb;
/* Tailwind (arbitrary) */
class="text-[#ab2dfb] bg-[#ab2dfb]"
/* SCSS */
$brand: #ab2dfb;
/* SwiftUI */
Color(red: 0.671, green: 0.176, blue: 0.984)
/* Android */
Color.parseColor("#ab2dfb")
/* Flutter */
Color(0xFFAB2DFB)
/* Python / OpenCV (BGR) */
(251, 45, 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#ffffff on #ab2dfb · 4.67:1
Use #ffffffAA at every size, AAA for large text only.
Aa
White text · 4.67:1 · recommended
AA pass · AA large pass · AAA fail
Aa
Black text · 4.50:1
AA pass · AA large pass · AAA fail
Reading the other direction: #ab2dfb as text scores 4.67:1 on white and 4.50:1 on black.

Accessibility — WCAG contrast

Aa
#ab2dfb on white: 4.67:1
AA ✓ pass · AA-large · AAA
Aa
#ab2dfb on black: 4.50:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #0070FF
deuteranopia · #0075F7
tritanopia · #9D6798

Color scale — 50 to 950

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

#F9F1FD
#F2E4FC
#E4C1FA
#D391FD
#BD5AFC
#ab2dfb
#9505F0
#7C04C8
#6303A0
#490773
#2E0448
Base = 500Lightest = 50 · #F9F1FDDarkest = 950 · #2E0448
:root {
  --brand-50: #F9F1FD;
  --brand-100: #F2E4FC;
  --brand-200: #E4C1FA;
  --brand-300: #D391FD;
  --brand-400: #BD5AFC;
  --brand-500: #ab2dfb;
  --brand-600: #9505F0;
  --brand-700: #7C04C8;
  --brand-800: #6303A0;
  --brand-900: #490773;
  --brand-950: #2E0448;
  --brand: #ab2dfb;
  --brand-ink: #ffffff;
}

Colors that work with #ab2dfb

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#F8F4FA
Tinted page background
Border#DBC0ED
Hairlines and dividers
Muted text#7C4B9B
Captions on the surface
Accent#83CC00
Second voice, not a rival
Dark variant#4D027D
Hover, pressed, headers
Light variant#F5E6FF
Selected rows, tints
Dark surface#1E1424
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 #ab2dfb

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

Works well for
  • Body text and links on white
  • Text and icons on dark surfaces
  • 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#7DFB2D
Analogous left#442DFB
Analogous right#FB2DE4
Split-complement 1#E4FB2D
Split-complement 2#2DFB44
Triadic 1#FBAB2D
Triadic 2#2DFBAB
Tetradic#FB442D

RGB percentages

Red67.1%
Green17.6%
Blue98.4%

CMYK percentages

Cyan31.9%
Magenta82.1%
Yellow0.0%
Key (black)1.6%

Color previews

#ab2dfb text on a black background

contrast 4.50:1

Card sample

#ab2dfb text on a white background

contrast 4.67:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #ab2dfb

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.

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

#ab2dfb, answered

What color is #ab2dfb?

#ab2dfb is a balanced electric violet, closest to Blue Violet (ΔE2000 6.8). It sits at 277° on the hue wheel with 96% saturation and 58% lightness, which reads as cool.

What is the RGB value of #ab2dfb?

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

Is #ab2dfb a light or a dark color?

It is a dark color. Relative luminance is 0.1750 and perceived brightness is 51%, so white text on it reaches 4.67:1.

Should I use black or white text on #ab2dfb?

White. It scores 4.67:1 against #ab2dfb, versus 4.50:1 for black — AA at any size.

What is the complementary color of #ab2dfb?

#7DFB2D sits directly opposite on the wheel. Softer options are the split-complements #E4FB2D and #2DFB44, which give the same contrast with far less vibration.

What colors go well with #ab2dfb?

For interface work: #F8F4FA as the surface, #DBC0ED for borders, #7C4B9B for secondary text, #83CC00 as an accent and #4D027D for hover and pressed states. For a palette, the analogous pair #442DFB and #FB2DE4 stays calm, while #7DFB2D is the loudest partner.

What is #ab2dfb in CMYK for printing?

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

Cool — it scores 63 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #F72DFB; nudged cooler, #5E2BFD.

Work with #ab2dfb in the Color Lab