Skip to content

#ba2fe2

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

RGB
186, 47, 226
HSL
287°, 76%, 54%
CMYK
18, 79, 0, 11
Luminance
0.1796

At a glance

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

Hex
#ba2fe2
Hue
287°
violet
Saturation
76%
electric
Lightness
54%
balanced
Brightness
89%
HSV value
Perceived
52%
weighted brightness
Luminance
0.1796
WCAG relative
Temperature
Neutral
57/100 cool
Color family
Violet
Tone
Electric
Best ink
Black
4.59:1
Closest name
Medium Orchid
ΔE2000 6.3
Where it sits
Hue287° of 360°
Saturation76%
Lightness54%
Temperature
Warm ← → Cool57% cool

Reads neutral. Warm and cool siblings keep the same lightness, so you can swap one in without redoing your contrast maths.

Every format

HEX#ba2fe2
RGBrgb(186, 47, 226)
HSLhsl(287, 76%, 54%)
CMYKcmyk(18%, 79%, 0%, 11%)
LABlab(49.5 76.2 -62.6)
LCHlch(49.5 98.7 320.6)
OKLCHoklch(0.599 0.259 317.1)
Decimal12201954
Display P3color(display-p3 0.729 0.184 0.886)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#ba2fe2 on white: 4.57:1
AA ✓ pass · AA-large · AAA
Aa
#ba2fe2 on black: 4.59:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #006DE7
deuteranopia · #3279DE
tritanopia · #B8598A

Color scale — 50 to 950

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

#FAF3FC
#F5E7F9
#EAC8F4
#DE9DF1
#CE6BEA
#ba2fe2
#AE1ED7
#9119B3
#74148F
#551368
#350C41
Base = 500Lightest = 50 · #FAF3FCDarkest = 950 · #350C41
:root {
  --brand-50: #FAF3FC;
  --brand-100: #F5E7F9;
  --brand-200: #EAC8F4;
  --brand-300: #DE9DF1;
  --brand-400: #CE6BEA;
  --brand-500: #ba2fe2;
  --brand-600: #AE1ED7;
  --brand-700: #9119B3;
  --brand-800: #74148F;
  --brand-900: #551368;
  --brand-950: #350C41;
  --brand: #ba2fe2;
  --brand-ink: #000000;
}

Colors that work with #ba2fe2

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#F9F4FA
Tinted page background
Border#E3C0ED
Hairlines and dividers
Muted text#894B9B
Captions on the surface
Accent#61B715
Second voice, not a rival
Dark variant#5A1070
Hover, pressed, headers
Light variant#F8E9FC
Selected rows, tints
Dark surface#211424
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 #ba2fe2

Derived from its contrast, chroma and lightness — not from taste.

Works well for
  • Body text and links 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
  • 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#57E22F
Analogous left#602FE2
Analogous right#E22FB0
Split-complement 1#B0E22F
Split-complement 2#2FE260
Triadic 1#E2BA2F
Triadic 2#2FE2BA
Tetradic#E2602F

RGB percentages

Red72.9%
Green18.4%
Blue88.6%

CMYK percentages

Cyan17.7%
Magenta79.2%
Yellow0.0%
Key (black)11.4%

Color previews

#ba2fe2 text on a black background

contrast 4.59:1

Card sample

#ba2fe2 text on a white background

contrast 4.57:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #ba2fe2

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.

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

#ba2fe2, answered

What color is #ba2fe2?

#ba2fe2 is a balanced electric violet, closest to Medium Orchid (ΔE2000 6.3). It sits at 287° on the hue wheel with 76% saturation and 54% lightness, which reads as neutral.

What is the RGB value of #ba2fe2?

rgb(186, 47, 226) — 186 red, 47 green and 226 blue out of 255, or 72.9% / 18.4% / 88.6% by channel.

Is #ba2fe2 a light or a dark color?

It is a dark color. Relative luminance is 0.1796 and perceived brightness is 52%, so black text on it reaches 4.59:1.

Should I use black or white text on #ba2fe2?

Black. It scores 4.59:1 against #ba2fe2, versus 4.57:1 for white — AA at any size.

What is the complementary color of #ba2fe2?

#57E22F sits directly opposite on the wheel. Softer options are the split-complements #B0E22F and #2FE260, which give the same contrast with far less vibration.

What colors go well with #ba2fe2?

For interface work: #F9F4FA as the surface, #E3C0ED for borders, #894B9B for secondary text, #61B715 as an accent and #5A1070 for hover and pressed states. For a palette, the analogous pair #602FE2 and #E22FB0 stays calm, while #57E22F is the loudest partner.

What is #ba2fe2 in CMYK for printing?

cmyk(18%, 79%, 0%, 11%). 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 #ba2fe2 warm or cool?

Neutral — it scores 57 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #E22FC8; nudged cooler, #782DE4.

Work with #ba2fe2 in the Color Lab