Skip to content

#af4ceb

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

RGB
175, 76, 235
HSL
277°, 80%, 61%
CMYK
26, 68, 0, 8
Luminance
0.2028

At a glance

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

Hex
#af4ceb
Hue
277°
violet
Saturation
80%
electric
Lightness
61%
balanced
Brightness
92%
HSV value
Perceived
54%
weighted brightness
Luminance
0.2028
WCAG relative
Temperature
Cool
63/100 cool
Color family
Violet
Tone
Electric
Best ink
Black
5.06:1
Closest name
Medium Orchid
ΔE2000 5.1
Where it sits
Hue277° of 360°
Saturation80%
Lightness61%
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#af4ceb
RGBrgb(175, 76, 235)
HSLhsl(277, 80%, 61%)
CMYKcmyk(26%, 68%, 0%, 8%)
LABlab(52.1 65.5 -63.4)
LCHlch(52.1 91.2 315.9)
OKLCHoklch(0.616 0.233 309.8)
Decimal11488491
Display P3color(display-p3 0.686 0.298 0.922)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#af4ceb on white: 4.15:1
AA ✗ fail · AA-large · AAA
Aa
#af4ceb on black: 5.06:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #0078F0
deuteranopia · #317EE7
tritanopia · #A76E96

Color scale — 50 to 950

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

#F9F3FC
#F2E6F9
#E4C7F5
#D29AF4
#BB68EE
#af4ceb
#9319DC
#7A15B7
#621093
#48106A
#2D0A42
Base = 500Lightest = 50 · #F9F3FCDarkest = 950 · #2D0A42
:root {
  --brand-50: #F9F3FC;
  --brand-100: #F2E6F9;
  --brand-200: #E4C7F5;
  --brand-300: #D29AF4;
  --brand-400: #BB68EE;
  --brand-500: #af4ceb;
  --brand-600: #9319DC;
  --brand-700: #7A15B7;
  --brand-800: #621093;
  --brand-900: #48106A;
  --brand-950: #2D0A42;
  --brand: #af4ceb;
  --brand-ink: #000000;
}

Colors that work with #af4ceb

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#DCC0ED
Hairlines and dividers
Muted text#7D4B9B
Captions on the surface
Accent#7CBC10
Second voice, not a rival
Dark variant#4C0D73
Hover, pressed, headers
Light variant#F5E8FC
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 #af4ceb

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#88EB4C
Analogous left#604CEB
Analogous right#EB4CD7
Split-complement 1#D7EB4C
Split-complement 2#4CEB60
Triadic 1#EBAF4C
Triadic 2#4CEBAF
Tetradic#EB604C

RGB percentages

Red68.6%
Green29.8%
Blue92.2%

CMYK percentages

Cyan25.5%
Magenta67.7%
Yellow0.0%
Key (black)7.8%

Color previews

#af4ceb text on a black background

contrast 5.06:1

Card sample

#af4ceb text on a white background

contrast 4.15:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #af4ceb

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.

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

#af4ceb, answered

What color is #af4ceb?

#af4ceb is a balanced electric violet, closest to Medium Orchid (ΔE2000 5.1). It sits at 277° on the hue wheel with 80% saturation and 61% lightness, which reads as cool.

What is the RGB value of #af4ceb?

rgb(175, 76, 235) — 175 red, 76 green and 235 blue out of 255, or 68.6% / 29.8% / 92.2% by channel.

Is #af4ceb a light or a dark color?

It is a mid-tone. Relative luminance is 0.2028 and perceived brightness is 54%, so black text on it reaches 5.06:1.

Should I use black or white text on #af4ceb?

Black. It scores 5.06:1 against #af4ceb, versus 4.15:1 for white — AA at any size.

What is the complementary color of #af4ceb?

#88EB4C sits directly opposite on the wheel. Softer options are the split-complements #D7EB4C and #4CEB60, which give the same contrast with far less vibration.

What colors go well with #af4ceb?

For interface work: #F8F4FA as the surface, #DCC0ED for borders, #7D4B9B for secondary text, #7CBC10 as an accent and #4C0D73 for hover and pressed states. For a palette, the analogous pair #604CEB and #EB4CD7 stays calm, while #88EB4C is the loudest partner.

What is #af4ceb in CMYK for printing?

cmyk(26%, 68%, 0%, 8%). 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 #af4ceb 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 #E94CEB; nudged cooler, #744AED.

Work with #af4ceb in the Color Lab