Skip to content

#af51db

a balanced, vivid violet · cool · closest name: Medium Orchid

RGB
175, 81, 219
HSL
281°, 66%, 59%
CMYK
20, 63, 0, 14
Luminance
0.2011

At a glance

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

Hex
#af51db
Hue
281°
violet
Saturation
66%
vivid
Lightness
59%
balanced
Brightness
86%
HSV value
Perceived
53%
weighted brightness
Luminance
0.2011
WCAG relative
Temperature
Cool
61/100 cool
Color family
Violet
Tone
Vivid
Best ink
Black
5.02:1
Closest name
Medium Orchid
ΔE2000 3.1
Where it sits
Hue281° of 360°
Saturation66%
Lightness59%
Temperature
Warm ← → Cool61% 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#af51db
RGBrgb(175, 81, 219)
HSLhsl(281, 66%, 59%)
CMYKcmyk(20%, 63%, 0%, 14%)
LABlab(52.0 59.9 -54.7)
LCHlch(52.0 81.1 317.6)
OKLCHoklch(0.612 0.211 313.3)
Decimal11489755
Display P3color(display-p3 0.686 0.318 0.859)

Copy-ready code

/* CSS */
color: #af51db;
background-color: #af51db;
/* Tailwind (arbitrary) */
class="text-[#af51db] bg-[#af51db]"
/* SCSS */
$brand: #af51db;
/* SwiftUI */
Color(red: 0.686, green: 0.318, blue: 0.859)
/* Android */
Color.parseColor("#af51db")
/* Flutter */
Color(0xFFAF51DB)
/* Python / OpenCV (BGR) */
(219, 81, 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 #af51db · 5.02:1
Use #000000AA at every size, AAA for large text only.
Aa
White text · 4.18:1
AA fail · AA large pass · AAA fail
Aa
Black text · 5.02:1 · recommended
AA pass · AA large pass · AAA fail
Reading the other direction: #af51db as text scores 4.18:1 on white and 5.02:1 on black.

Accessibility — WCAG contrast

Aa
#af51db on white: 4.18:1
AA ✗ fail · AA-large · AAA
Aa
#af51db on black: 5.02:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #1477DF
deuteranopia · #497ED8
tritanopia · #AB6B8F

Color scale — 50 to 950

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

#F9F3FB
#F3E8F8
#E5CBF1
#D4A2EC
#BF74E2
#af51db
#982ACB
#7E23A9
#651C87
#4B1862
#2F0F3D
Base = 500Lightest = 50 · #F9F3FBDarkest = 950 · #2F0F3D
:root {
  --brand-50: #F9F3FB;
  --brand-100: #F3E8F8;
  --brand-200: #E5CBF1;
  --brand-300: #D4A2EC;
  --brand-400: #BF74E2;
  --brand-500: #af51db;
  --brand-600: #982ACB;
  --brand-700: #7E23A9;
  --brand-800: #651C87;
  --brand-900: #4B1862;
  --brand-950: #2F0F3D;
  --brand: #af51db;
  --brand-ink: #000000;
}

Colors that work with #af51db

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#F8F4FA
Tinted page background
Border#DEC0ED
Hairlines and dividers
Muted text#814B9B
Captions on the surface
Accent#70AD1F
Second voice, not a rival
Dark variant#4F166A
Hover, pressed, headers
Light variant#F5EAFB
Selected rows, tints
Dark surface#1F1424
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 #af51db

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
  • Brand accents, badges and data highlights
Use with care
  • Small text on white — under 4.5:1
  • 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#7DDB51
Analogous left#6A51DB
Analogous right#DB51C2
Split-complement 1#C2DB51
Split-complement 2#51DB6A
Triadic 1#DBAF51
Triadic 2#51DBAF
Tetradic#DB6A51

RGB percentages

Red68.6%
Green31.8%
Blue85.9%

CMYK percentages

Cyan20.1%
Magenta63.0%
Yellow0.0%
Key (black)14.1%

Color previews

#af51db text on a black background

contrast 5.02:1

Card sample

#af51db text on a white background

contrast 4.18:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #af51db

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.

#af51db 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

Converts to four-color process without much drama. Proof it anyway.

#af51db, answered

What color is #af51db?

#af51db is a balanced vivid violet, closest to Medium Orchid (ΔE2000 3.1). It sits at 281° on the hue wheel with 66% saturation and 59% lightness, which reads as cool.

What is the RGB value of #af51db?

rgb(175, 81, 219) — 175 red, 81 green and 219 blue out of 255, or 68.6% / 31.8% / 85.9% by channel.

Is #af51db a light or a dark color?

It is a mid-tone. Relative luminance is 0.2011 and perceived brightness is 53%, so black text on it reaches 5.02:1.

Should I use black or white text on #af51db?

Black. It scores 5.02:1 against #af51db, versus 4.18:1 for white — AA at any size.

What is the complementary color of #af51db?

#7DDB51 sits directly opposite on the wheel. Softer options are the split-complements #C2DB51 and #51DB6A, which give the same contrast with far less vibration.

What colors go well with #af51db?

For interface work: #F8F4FA as the surface, #DEC0ED for borders, #814B9B for secondary text, #70AD1F as an accent and #4F166A for hover and pressed states. For a palette, the analogous pair #6A51DB and #DB51C2 stays calm, while #7DDB51 is the loudest partner.

What is #af51db in CMYK for printing?

cmyk(20%, 63%, 0%, 14%). This is a screen-to-ink approximation — ask your printer for a proof before committing to a run.

Is #af51db warm or cool?

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

Work with #af51db in the Color Lab