Skip to content

#ba2da8

a balanced, vivid magenta / pink · neutral · closest name: Medium Violet Red

RGB
186, 45, 168
HSL
308°, 61%, 45%
CMYK
0, 76, 10, 27
Luminance
0.1514

At a glance

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

Hex
#ba2da8
Hue
308°
magenta / pink
Saturation
61%
vivid
Lightness
45%
balanced
Brightness
73%
HSV value
Perceived
48%
weighted brightness
Luminance
0.1514
WCAG relative
Temperature
Neutral
46/100 cool
Color family
Magenta / pink
Tone
Vivid
Best ink
White
5.21:1
Closest name
Medium Violet Red
ΔE2000 7.7
Where it sits
Hue308° of 360°
Saturation61%
Lightness45%
Temperature
Warm ← → Cool46% 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#ba2da8
RGBrgb(186, 45, 168)
HSLhsl(308, 61%, 45%)
CMYKcmyk(0%, 76%, 10%, 27%)
LABlab(45.8 67.2 -34.8)
LCHlch(45.8 75.7 332.6)
OKLCHoklch(0.562 0.217 333.9)
Decimal12201384
Display P3color(display-p3 0.729 0.176 0.659)

Copy-ready code

/* CSS */
color: #ba2da8;
background-color: #ba2da8;
/* Tailwind (arbitrary) */
class="text-[#ba2da8] bg-[#ba2da8]"
/* SCSS */
$brand: #ba2da8;
/* SwiftUI */
Color(red: 0.729, green: 0.176, blue: 0.659)
/* Android */
Color.parseColor("#ba2da8")
/* Flutter */
Color(0xFFBA2DA8)
/* Python / OpenCV (BGR) */
(168, 45, 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#ffffff on #ba2da8 · 5.21:1
Use #ffffffAA at every size, AAA for large text only.
Aa
White text · 5.21:1 · recommended
AA pass · AA large pass · AAA fail
Aa
Black text · 4.03:1
AA fail · AA large pass · AAA fail
Reading the other direction: #ba2da8 as text scores 5.21:1 on white and 4.03:1 on black.

Accessibility — WCAG contrast

Aa
#ba2da8 on white: 5.21:1
AA ✓ pass · AA-large · AAA
Aa
#ba2da8 on black: 4.03:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #2960AB
deuteranopia · #5F74A5
tritanopia · #C33B68

Color scale — 50 to 950

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

#FBF4FA
#F7E8F5
#F0CCEB
#E9A5E0
#DE78D1
#D34AC2
#ba2da8
#A42894
#832077
#601B57
#3C1136
Base = 600Lightest = 50 · #FBF4FADarkest = 950 · #3C1136
:root {
  --brand-50: #FBF4FA;
  --brand-100: #F7E8F5;
  --brand-200: #F0CCEB;
  --brand-300: #E9A5E0;
  --brand-400: #DE78D1;
  --brand-500: #D34AC2;
  --brand-600: #ba2da8;
  --brand-700: #A42894;
  --brand-800: #832077;
  --brand-900: #601B57;
  --brand-950: #3C1136;
  --brand: #ba2da8;
  --brand-ink: #ffffff;
}

Colors that work with #ba2da8

Not a palette — a role sheet. Each swatch answers one question you will hit while building the component.

Text on it#ffffff
White wins here
Surface#FAF4FA
Tinted page background
Border#EDC0E7
Hairlines and dividers
Muted text#9B4B91
Captions on the surface
Accent#34A923
Second voice, not a rival
Dark variant#67195D
Hover, pressed, headers
Light variant#FAEAF8
Selected rows, tints
Dark surface#241422
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 #ba2da8

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

Works well for
  • Body text and links on white
  • 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#2DBA3F
Analogous left#862DBA
Analogous right#BA2D61
Split-complement 1#61BA2D
Split-complement 2#2DBA86
Triadic 1#A8BA2D
Triadic 2#2DA8BA
Tetradic#BA862D

RGB percentages

Red72.9%
Green17.6%
Blue65.9%

CMYK percentages

Cyan0.0%
Magenta75.8%
Yellow9.7%
Key (black)27.1%

Color previews

#ba2da8 text on a black background

contrast 4.03:1

Card sample

#ba2da8 text on a white background

contrast 5.21:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #ba2da8

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.

#ba2da8 in the real world

Where a color in this family tends to land, and the interface roles it is usually asked to play.

Industries
BeautyFashionLifestyleYouth brands
Common UI roles
ButtonsLinksFocus statesCharts
Print note

Converts to four-color process without much drama. Proof it anyway.

#ba2da8, answered

What color is #ba2da8?

#ba2da8 is a balanced vivid magenta / pink, closest to Medium Violet Red (ΔE2000 7.7). It sits at 308° on the hue wheel with 61% saturation and 45% lightness, which reads as neutral.

What is the RGB value of #ba2da8?

rgb(186, 45, 168) — 186 red, 45 green and 168 blue out of 255, or 72.9% / 17.6% / 65.9% by channel.

Is #ba2da8 a light or a dark color?

It is a dark color. Relative luminance is 0.1514 and perceived brightness is 48%, so white text on it reaches 5.21:1.

Should I use black or white text on #ba2da8?

White. It scores 5.21:1 against #ba2da8, versus 4.03:1 for black — AA at any size.

What is the complementary color of #ba2da8?

#2DBA3F sits directly opposite on the wheel. Softer options are the split-complements #61BA2D and #2DBA86, which give the same contrast with far less vibration.

What colors go well with #ba2da8?

For interface work: #FAF4FA as the surface, #EDC0E7 for borders, #9B4B91 for secondary text, #34A923 as an accent and #67195D for hover and pressed states. For a palette, the analogous pair #862DBA and #BA2D61 stays calm, while #2DBA3F is the loudest partner.

What is #ba2da8 in CMYK for printing?

cmyk(0%, 76%, 10%, 27%). This is a screen-to-ink approximation — ask your printer for a proof before committing to a run.

Is #ba2da8 warm or cool?

Neutral — it scores 46 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #BA2D74; nudged cooler, #9A2BBC.

Work with #ba2da8 in the Color Lab