Skip to content

#ba7ffd

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

RGB
186, 127, 253
HSL
268°, 97%, 75%
CMYK
27, 50, 0, 1
Luminance
0.3271

At a glance

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

Hex
#ba7ffd
Hue
268°
violet
Saturation
97%
electric
Lightness
75%
light
Brightness
99%
HSV value
Perceived
65%
weighted brightness
Luminance
0.3271
WCAG relative
Temperature
Cool
68/100 cool
Color family
Violet
Tone
Electric
Best ink
Black
7.54:1
Closest name
Medium Purple
ΔE2000 8.7
Where it sits
Hue268° of 360°
Saturation97%
Lightness75%
Temperature
Warm ← → Cool68% 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#ba7ffd
RGBrgb(186, 127, 253)
HSLhsl(268, 97%, 75%)
CMYKcmyk(27%, 50%, 0%, 1%)
LABlab(63.9 46.8 -54.5)
LCHlch(63.9 71.9 310.7)
OKLCHoklch(0.708 0.184 303.7)
Decimal12222461
Display P3color(display-p3 0.729 0.498 0.992)

Copy-ready code

/* CSS */
color: #ba7ffd;
background-color: #ba7ffd;
/* Tailwind (arbitrary) */
class="text-[#ba7ffd] bg-[#ba7ffd]"
/* SCSS */
$brand: #ba7ffd;
/* SwiftUI */
Color(red: 0.729, green: 0.498, blue: 0.992)
/* Android */
Color.parseColor("#ba7ffd")
/* Flutter */
Color(0xFFBA7FFD)
/* Python / OpenCV (BGR) */
(253, 127, 186)

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

Accessibility — WCAG contrast

Aa
#ba7ffd on white: 2.78:1
AA ✗ fail · AA-large · AAA
Aa
#ba7ffd on black: 7.54:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #5899FF
deuteranopia · #689BFA
tritanopia · #AE96B2

Color scale — 50 to 950

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

#F7F1FD
#EFE4FC
#DCC1FB
#ba7ffd
#A659FC
#8822FC
#7304F1
#6003C9
#4D03A1
#3A0774
#240448
Base = 300Lightest = 50 · #F7F1FDDarkest = 950 · #240448
:root {
  --brand-50: #F7F1FD;
  --brand-100: #EFE4FC;
  --brand-200: #DCC1FB;
  --brand-300: #ba7ffd;
  --brand-400: #A659FC;
  --brand-500: #8822FC;
  --brand-600: #7304F1;
  --brand-700: #6003C9;
  --brand-800: #4D03A1;
  --brand-900: #3A0774;
  --brand-950: #240448;
  --brand: #ba7ffd;
  --brand-ink: #000000;
}

Colors that work with #ba7ffd

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#D5C0ED
Hairlines and dividers
Muted text#704B9B
Captions on the surface
Accent#A0CC00
Second voice, not a rival
Dark variant#3C027E
Hover, pressed, headers
Light variant#F1E6FF
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 #ba7ffd

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#C2FD7F
Analogous left#7F83FD
Analogous right#F97FFD
Split-complement 1#FDF97F
Split-complement 2#83FD7F
Triadic 1#FDBA7F
Triadic 2#7FFDBA
Tetradic#FD7F83

RGB percentages

Red72.9%
Green49.8%
Blue99.2%

CMYK percentages

Cyan26.5%
Magenta49.8%
Yellow0.0%
Key (black)0.8%

Color previews

#ba7ffd text on a black background

contrast 7.54:1

Card sample

#ba7ffd text on a white background

contrast 2.78:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(186, 127, 253, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(186, 127, 253, 0.45);
Border & gradient
Gradient panel
border: 3px solid #ba7ffd;
background: linear-gradient(135deg, #ba7ffd, #FD7FEC);

Monochromatic scale

Palettes built from #ba7ffd

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.

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

#ba7ffd, answered

What color is #ba7ffd?

#ba7ffd is a light electric violet, closest to Medium Purple (ΔE2000 8.7). It sits at 268° on the hue wheel with 97% saturation and 75% lightness, which reads as cool.

What is the RGB value of #ba7ffd?

rgb(186, 127, 253) — 186 red, 127 green and 253 blue out of 255, or 72.9% / 49.8% / 99.2% by channel.

Is #ba7ffd a light or a dark color?

It is a mid-tone. Relative luminance is 0.3271 and perceived brightness is 65%, so black text on it reaches 7.54:1.

Should I use black or white text on #ba7ffd?

Black. It scores 7.54:1 against #ba7ffd, versus 2.78:1 for white — AAA at any size.

What is the complementary color of #ba7ffd?

#C2FD7F sits directly opposite on the wheel. Softer options are the split-complements #FDF97F and #83FD7F, which give the same contrast with far less vibration.

What colors go well with #ba7ffd?

For interface work: #F7F4FA as the surface, #D5C0ED for borders, #704B9B for secondary text, #A0CC00 as an accent and #3C027E for hover and pressed states. For a palette, the analogous pair #7F83FD and #F97FFD stays calm, while #C2FD7F is the loudest partner.

What is #ba7ffd in CMYK for printing?

cmyk(27%, 50%, 0%, 1%). 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 #ba7ffd warm or cool?

Cool — it scores 68 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #E87FFD; nudged cooler, #8B7EFE.

Work with #ba7ffd in the Color Lab