Skip to content

#b40c97

a dark, electric magenta / pink · neutral · closest name: Medium Violet Red

RGB
180, 12, 151
HSL
310°, 88%, 38%
CMYK
0, 93, 16, 29
Luminance
0.1220

At a glance

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

Hex
#b40c97
Hue
310°
magenta / pink
Saturation
88%
electric
Lightness
38%
dark
Brightness
71%
HSV value
Perceived
44%
weighted brightness
Luminance
0.1220
WCAG relative
Temperature
Neutral
44/100 cool
Color family
Magenta / pink
Tone
Electric
Best ink
White
6.10:1
Closest name
Medium Violet Red
ΔE2000 6.8
Where it sits
Hue310° of 360°
Saturation88%
Lightness38%
Temperature
Warm ← → Cool44% 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#b40c97
RGBrgb(180, 12, 151)
HSLhsl(310, 88%, 38%)
CMYKcmyk(0%, 93%, 16%, 29%)
LABlab(41.5 70.4 -31.4)
LCHlch(41.5 77.1 335.9)
OKLCHoklch(0.526 0.226 337.7)
Decimal11799703
Display P3color(display-p3 0.706 0.047 0.592)

Copy-ready code

/* CSS */
color: #b40c97;
background-color: #b40c97;
/* Tailwind (arbitrary) */
class="text-[#b40c97] bg-[#b40c97]"
/* SCSS */
$brand: #b40c97;
/* SwiftUI */
Color(red: 0.706, green: 0.047, blue: 0.592)
/* Android */
Color.parseColor("#b40c97")
/* Flutter */
Color(0xFFB40C97)
/* Python / OpenCV (BGR) */
(151, 12, 180)

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 #b40c97 · 6.10:1
Use #ffffffAA at every size, AAA for large text only.
Aa
White text · 6.10:1 · recommended
AA pass · AA large pass · AAA fail
Aa
Black text · 3.44:1
AA fail · AA large pass · AAA fail
Reading the other direction: #b40c97 as text scores 6.10:1 on white and 3.44:1 on black.

Accessibility — WCAG contrast

Aa
#b40c97 on white: 6.10:1
AA ✓ pass · AA-large · AAA
Aa
#b40c97 on black: 3.44:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #19539A
deuteranopia · #596A94
tritanopia · #BE1E59

Color scale — 50 to 950

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

#FDF2FB
#FAE5F7
#F8C4EF
#F896E7
#F461DB
#F12DCF
#E50FC0
#b40c97
#990A80
#6E0C5D
#45073A
Base = 700Lightest = 50 · #FDF2FBDarkest = 950 · #45073A
:root {
  --brand-50: #FDF2FB;
  --brand-100: #FAE5F7;
  --brand-200: #F8C4EF;
  --brand-300: #F896E7;
  --brand-400: #F461DB;
  --brand-500: #F12DCF;
  --brand-600: #E50FC0;
  --brand-700: #b40c97;
  --brand-800: #990A80;
  --brand-900: #6E0C5D;
  --brand-950: #45073A;
  --brand: #b40c97;
  --brand-ink: #ffffff;
}

Colors that work with #b40c97

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#FAF4F9
Tinted page background
Border#EDC0E5
Hairlines and dividers
Muted text#9B4B8D
Captions on the surface
Accent#17C408
Second voice, not a rival
Dark variant#780864
Hover, pressed, headers
Light variant#FDE7FA
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 #b40c97

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
  • Headers, footers and dark-mode surfaces
  • Brand accents, badges and data highlights
Use with care
  • Full-page backgrounds — tiring over long sessions
  • Black 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#0CB429
Analogous left#7D0CB4
Analogous right#B40C43
Split-complement 1#43B40C
Split-complement 2#0CB47D
Triadic 1#97B40C
Triadic 2#0C97B4
Tetradic#B47D0C

RGB percentages

Red70.6%
Green4.7%
Blue59.2%

CMYK percentages

Cyan0.0%
Magenta93.3%
Yellow16.1%
Key (black)29.4%

Color previews

#b40c97 text on a black background

contrast 3.44:1

Card sample

#b40c97 text on a white background

contrast 6.10:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(180, 12, 151, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(180, 12, 151, 0.45);
Border & gradient
Gradient panel
border: 3px solid #b40c97;
background: linear-gradient(135deg, #b40c97, #B40C27);

Monochromatic scale

Palettes built from #b40c97

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.

#b40c97 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

Sits outside most CMYK gamuts — expect a duller press result, or specify a spot ink.

#b40c97, answered

What color is #b40c97?

#b40c97 is a dark electric magenta / pink, closest to Medium Violet Red (ΔE2000 6.8). It sits at 310° on the hue wheel with 88% saturation and 38% lightness, which reads as neutral.

What is the RGB value of #b40c97?

rgb(180, 12, 151) — 180 red, 12 green and 151 blue out of 255, or 70.6% / 4.7% / 59.2% by channel.

Is #b40c97 a light or a dark color?

It is a dark color. Relative luminance is 0.1220 and perceived brightness is 44%, so white text on it reaches 6.10:1.

Should I use black or white text on #b40c97?

White. It scores 6.10:1 against #b40c97, versus 3.44:1 for black — AA at any size.

What is the complementary color of #b40c97?

#0CB429 sits directly opposite on the wheel. Softer options are the split-complements #43B40C and #0CB47D, which give the same contrast with far less vibration.

What colors go well with #b40c97?

For interface work: #FAF4F9 as the surface, #EDC0E5 for borders, #9B4B8D for secondary text, #17C408 as an accent and #780864 for hover and pressed states. For a palette, the analogous pair #7D0CB4 and #B40C43 stays calm, while #0CB429 is the loudest partner.

What is #b40c97 in CMYK for printing?

cmyk(0%, 93%, 16%, 29%). 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 #b40c97 warm or cool?

Neutral — it scores 44 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #B40C59; nudged cooler, #950AB6.

Work with #b40c97 in the Color Lab