Skip to content

#d40c5f

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

RGB
212, 12, 95
HSL
335°, 89%, 44%
CMYK
0, 94, 55, 17
Luminance
0.1509

At a glance

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

Hex
#d40c5f
Hue
335°
magenta / pink
Saturation
89%
electric
Lightness
44%
dark
Brightness
83%
HSV value
Perceived
47%
weighted brightness
Luminance
0.1509
WCAG relative
Temperature
Warm
30/100 cool
Color family
Magenta / pink
Tone
Electric
Best ink
White
5.23:1
Closest name
Medium Violet Red
ΔE2000 10.3
Where it sits
Hue335° of 360°
Saturation89%
Lightness44%
Temperature
Warm ← → Cool30% cool

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

Every format

HEX#d40c5f
RGBrgb(212, 12, 95)
HSLhsl(335, 89%, 44%)
CMYKcmyk(0%, 94%, 55%, 17%)
LABlab(45.8 71.8 10.1)
LCHlch(45.8 72.5 8.0)
OKLCHoklch(0.561 0.221 6.7)
Decimal13896799
Display P3color(display-p3 0.831 0.047 0.373)

Copy-ready code

/* CSS */
color: #d40c5f;
background-color: #d40c5f;
/* Tailwind (arbitrary) */
class="text-[#d40c5f] bg-[#d40c5f]"
/* SCSS */
$brand: #d40c5f;
/* SwiftUI */
Color(red: 0.831, green: 0.047, blue: 0.373)
/* Android */
Color.parseColor("#d40c5f")
/* Flutter */
Color(0xFFD40C5F)
/* Python / OpenCV (BGR) */
(95, 12, 212)

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

Accessibility — WCAG contrast

Aa
#d40c5f on white: 5.23:1
AA ✓ pass · AA-large · AAA
Aa
#d40c5f on black: 4.02:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #505460
deuteranopia · #81795A
tritanopia · #E80039

Color scale — 50 to 950

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

#FDF2F6
#FBE5EE
#F8C4D9
#F995BE
#F6609E
#F32B7E
#E80D68
#d40c5f
#9A0945
#6F0B35
#460721
Base = 700Lightest = 50 · #FDF2F6Darkest = 950 · #460721
:root {
  --brand-50: #FDF2F6;
  --brand-100: #FBE5EE;
  --brand-200: #F8C4D9;
  --brand-300: #F995BE;
  --brand-400: #F6609E;
  --brand-500: #F32B7E;
  --brand-600: #E80D68;
  --brand-700: #d40c5f;
  --brand-800: #9A0945;
  --brand-900: #6F0B35;
  --brand-950: #460721;
  --brand: #d40c5f;
  --brand-ink: #ffffff;
}

Colors that work with #d40c5f

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#FAF4F7
Tinted page background
Border#EDC0D2
Hairlines and dividers
Muted text#9B4B6C
Captions on the surface
Accent#07C546
Second voice, not a rival
Dark variant#790736
Hover, pressed, headers
Light variant#FEE7F0
Selected rows, tints
Dark surface#24141B
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 #d40c5f

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#0CD481
Analogous left#D40CC3
Analogous right#D41D0C
Split-complement 1#0CD41D
Split-complement 2#0CC3D4
Triadic 1#5FD40C
Triadic 2#0C5FD4
Tetradic#C3D40C

RGB percentages

Red83.1%
Green4.7%
Blue37.3%

CMYK percentages

Cyan0.0%
Magenta94.3%
Yellow55.2%
Key (black)16.9%

Color previews

#d40c5f text on a black background

contrast 4.02:1

Card sample

#d40c5f text on a white background

contrast 5.23:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #d40c5f

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.

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

#d40c5f, answered

What color is #d40c5f?

#d40c5f is a dark electric magenta / pink, closest to Medium Violet Red (ΔE2000 10.3). It sits at 335° on the hue wheel with 89% saturation and 44% lightness, which reads as warm.

What is the RGB value of #d40c5f?

rgb(212, 12, 95) — 212 red, 12 green and 95 blue out of 255, or 83.1% / 4.7% / 37.3% by channel.

Is #d40c5f a light or a dark color?

It is a dark color. Relative luminance is 0.1509 and perceived brightness is 47%, so white text on it reaches 5.23:1.

Should I use black or white text on #d40c5f?

White. It scores 5.23:1 against #d40c5f, versus 4.02:1 for black — AA at any size.

What is the complementary color of #d40c5f?

#0CD481 sits directly opposite on the wheel. Softer options are the split-complements #0CD41D and #0CC3D4, which give the same contrast with far less vibration.

What colors go well with #d40c5f?

For interface work: #FAF4F7 as the surface, #EDC0D2 for borders, #9B4B6C for secondary text, #07C546 as an accent and #790736 for hover and pressed states. For a palette, the analogous pair #D40CC3 and #D41D0C stays calm, while #0CD481 is the loudest partner.

What is #d40c5f in CMYK for printing?

cmyk(0%, 94%, 55%, 17%). 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 #d40c5f warm or cool?

Warm — it scores 30 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #D40C16; nudged cooler, #D60AAA.

Work with #d40c5f in the Color Lab