Skip to content

#ba8af9

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

RGB
186, 138, 249
HSL
266°, 90%, 76%
CMYK
25, 45, 0, 2
Luminance
0.3546

At a glance

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

Hex
#ba8af9
Hue
266°
violet
Saturation
90%
electric
Lightness
76%
light
Brightness
98%
HSV value
Perceived
66%
weighted brightness
Luminance
0.3546
WCAG relative
Temperature
Cool
69/100 cool
Color family
Violet
Tone
Electric
Best ink
Black
8.09:1
Closest name
Medium Purple
ΔE2000 9.9
Where it sits
Hue266° of 360°
Saturation90%
Lightness76%
Temperature
Warm ← → Cool69% 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#ba8af9
RGBrgb(186, 138, 249)
HSLhsl(266, 90%, 76%)
CMYKcmyk(25%, 45%, 0%, 2%)
LABlab(66.1 39.9 -48.9)
LCHlch(66.1 63.1 309.2)
OKLCHoklch(0.724 0.162 302.5)
Decimal12225273
Display P3color(display-p3 0.729 0.541 0.976)

Copy-ready code

/* CSS */
color: #ba8af9;
background-color: #ba8af9;
/* Tailwind (arbitrary) */
class="text-[#ba8af9] bg-[#ba8af9]"
/* SCSS */
$brand: #ba8af9;
/* SwiftUI */
Color(red: 0.729, green: 0.541, blue: 0.976)
/* Android */
Color.parseColor("#ba8af9")
/* Flutter */
Color(0xFFBA8AF9)
/* Python / OpenCV (BGR) */
(249, 138, 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 #ba8af9 · 8.09:1
Use #000000AAA at every size.
Aa
White text · 2.60:1
AA fail · AA large fail · AAA fail
Aa
Black text · 8.09:1 · recommended
AA pass · AA large pass · AAA pass
Reading the other direction: #ba8af9 as text scores 2.60:1 on white and 8.09:1 on black.

Accessibility — WCAG contrast

Aa
#ba8af9 on white: 2.60:1
AA ✗ fail · AA-large · AAA
Aa
#ba8af9 on black: 8.09:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #6BA0FD
deuteranopia · #77A0F6
tritanopia · #AF9DB6

Color scale — 50 to 950

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

#F7F2FD
#EEE5FB
#DAC3F8
#ba8af9
#A05FF7
#812AF4
#6B0CE9
#590AC2
#48089B
#360A70
#220746
Base = 300Lightest = 50 · #F7F2FDDarkest = 950 · #220746
:root {
  --brand-50: #F7F2FD;
  --brand-100: #EEE5FB;
  --brand-200: #DAC3F8;
  --brand-300: #ba8af9;
  --brand-400: #A05FF7;
  --brand-500: #812AF4;
  --brand-600: #6B0CE9;
  --brand-700: #590AC2;
  --brand-800: #48089B;
  --brand-900: #360A70;
  --brand-950: #220746;
  --brand: #ba8af9;
  --brand-ink: #000000;
}

Colors that work with #ba8af9

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#D3C0ED
Hairlines and dividers
Muted text#6D4B9B
Captions on the surface
Accent#A2C507
Second voice, not a rival
Dark variant#380679
Hover, pressed, headers
Light variant#F1E7FE
Selected rows, tints
Dark surface#1B1424
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 #ba8af9

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#C9F98A
Analogous left#8A92F9
Analogous right#F18AF9
Split-complement 1#F9F18A
Split-complement 2#92F98A
Triadic 1#F9BA8A
Triadic 2#8AF9BA
Tetradic#F98A92

RGB percentages

Red72.9%
Green54.1%
Blue97.6%

CMYK percentages

Cyan25.3%
Magenta44.6%
Yellow0.0%
Key (black)2.4%

Color previews

#ba8af9 text on a black background

contrast 8.09:1

Card sample

#ba8af9 text on a white background

contrast 2.60:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #ba8af9

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.

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

#ba8af9, answered

What color is #ba8af9?

#ba8af9 is a light electric violet, closest to Medium Purple (ΔE2000 9.9). It sits at 266° on the hue wheel with 90% saturation and 76% lightness, which reads as cool.

What is the RGB value of #ba8af9?

rgb(186, 138, 249) — 186 red, 138 green and 249 blue out of 255, or 72.9% / 54.1% / 97.6% by channel.

Is #ba8af9 a light or a dark color?

It is a mid-tone. Relative luminance is 0.3546 and perceived brightness is 66%, so black text on it reaches 8.09:1.

Should I use black or white text on #ba8af9?

Black. It scores 8.09:1 against #ba8af9, versus 2.60:1 for white — AAA at any size.

What is the complementary color of #ba8af9?

#C9F98A sits directly opposite on the wheel. Softer options are the split-complements #F9F18A and #92F98A, which give the same contrast with far less vibration.

What colors go well with #ba8af9?

For interface work: #F7F4FA as the surface, #D3C0ED for borders, #6D4B9B for secondary text, #A2C507 as an accent and #380679 for hover and pressed states. For a palette, the analogous pair #8A92F9 and #F18AF9 stays calm, while #C9F98A is the loudest partner.

What is #ba8af9 in CMYK for printing?

cmyk(25%, 45%, 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 #ba8af9 warm or cool?

Cool — it scores 69 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #E38AF9; nudged cooler, #9089FA.

Work with #ba8af9 in the Color Lab