Skip to content

#ba52fe

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

RGB
186, 82, 254
HSL
276°, 99%, 66%
CMYK
27, 68, 0, 0
Luminance
0.2363

At a glance

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

Hex
#ba52fe
Hue
276°
violet
Saturation
99%
electric
Lightness
66%
light
Brightness
100%
HSV value
Perceived
58%
weighted brightness
Luminance
0.2363
WCAG relative
Temperature
Cool
63/100 cool
Color family
Violet
Tone
Electric
Best ink
Black
5.73:1
Closest name
Medium Orchid
ΔE2000 6.4
Where it sits
Hue276° of 360°
Saturation99%
Lightness66%
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#ba52fe
RGBrgb(186, 82, 254)
HSLhsl(276, 99%, 66%)
CMYKcmyk(27%, 68%, 0%, 0%)
LABlab(55.7 69.1 -68.2)
LCHlch(55.7 97.1 315.4)
OKLCHoklch(0.649 0.248 308.7)
Decimal12210942
Display P3color(display-p3 0.729 0.322 0.996)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#ba52fe on white: 3.67:1
AA ✗ fail · AA-large · AAA
Aa
#ba52fe on black: 5.73:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #0081FF
deuteranopia · #2E87FA
tritanopia · #B078A2

Color scale — 50 to 950

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

#F9F1FE
#F2E3FC
#E4C0FB
#D38FFE
#ba52fe
#A620FE
#9401F3
#7B01CB
#6301A2
#490675
#2E0349
Base = 400Lightest = 50 · #F9F1FEDarkest = 950 · #2E0349
:root {
  --brand-50: #F9F1FE;
  --brand-100: #F2E3FC;
  --brand-200: #E4C0FB;
  --brand-300: #D38FFE;
  --brand-400: #ba52fe;
  --brand-500: #A620FE;
  --brand-600: #9401F3;
  --brand-700: #7B01CB;
  --brand-800: #6301A2;
  --brand-900: #490675;
  --brand-950: #2E0349;
  --brand: #ba52fe;
  --brand-ink: #000000;
}

Colors that work with #ba52fe

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#DBC0ED
Hairlines and dividers
Muted text#7B4B9B
Captions on the surface
Accent#83CC00
Second voice, not a rival
Dark variant#4D017F
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 #ba52fe

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
  • Card and section backgrounds
  • Brand accents, badges and data highlights
Use with care
  • Small text on white — under 4.5:1
  • 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#96FE52
Analogous left#6452FE
Analogous right#FE52EC
Split-complement 1#ECFE52
Split-complement 2#52FE64
Triadic 1#FEBA52
Triadic 2#52FEBA
Tetradic#FE6452

RGB percentages

Red72.9%
Green32.2%
Blue99.6%

CMYK percentages

Cyan26.8%
Magenta67.7%
Yellow0.0%
Key (black)0.4%

Color previews

#ba52fe text on a black background

contrast 5.73:1

Card sample

#ba52fe text on a white background

contrast 3.67:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #ba52fe

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.

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

#ba52fe, answered

What color is #ba52fe?

#ba52fe is a light electric violet, closest to Medium Orchid (ΔE2000 6.4). It sits at 276° on the hue wheel with 99% saturation and 66% lightness, which reads as cool.

What is the RGB value of #ba52fe?

rgb(186, 82, 254) — 186 red, 82 green and 254 blue out of 255, or 72.9% / 32.2% / 99.6% by channel.

Is #ba52fe a light or a dark color?

It is a mid-tone. Relative luminance is 0.2363 and perceived brightness is 58%, so black text on it reaches 5.73:1.

Should I use black or white text on #ba52fe?

Black. It scores 5.73:1 against #ba52fe, versus 3.67:1 for white — AA at any size.

What is the complementary color of #ba52fe?

#96FE52 sits directly opposite on the wheel. Softer options are the split-complements #ECFE52 and #52FE64, which give the same contrast with far less vibration.

What colors go well with #ba52fe?

For interface work: #F8F4FA as the surface, #DBC0ED for borders, #7B4B9B for secondary text, #83CC00 as an accent and #4D017F for hover and pressed states. For a palette, the analogous pair #6452FE and #FE52EC stays calm, while #96FE52 is the loudest partner.

What is #ba52fe in CMYK for printing?

cmyk(27%, 68%, 0%, 0%). 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 #ba52fe 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 #F952FE; nudged cooler, #7B51FF.

Work with #ba52fe in the Color Lab