Skip to content

#c40cab

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

RGB
196, 12, 171
HSL
308°, 89%, 41%
CMYK
0, 94, 13, 23
Luminance
0.1494

At a glance

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

Hex
#c40cab
Hue
308°
magenta / pink
Saturation
89%
electric
Lightness
41%
dark
Brightness
77%
HSV value
Perceived
48%
weighted brightness
Luminance
0.1494
WCAG relative
Temperature
Neutral
45/100 cool
Color family
Magenta / pink
Tone
Electric
Best ink
White
5.27:1
Closest name
Medium Violet Red
ΔE2000 7.5
Where it sits
Hue308° of 360°
Saturation89%
Lightness41%
Temperature
Warm ← → Cool45% 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#c40cab
RGBrgb(196, 12, 171)
HSLhsl(308, 89%, 41%)
CMYKcmyk(0%, 94%, 13%, 23%)
LABlab(45.5 76.0 -36.9)
LCHlch(45.5 84.5 334.1)
OKLCHoklch(0.564 0.245 335.7)
Decimal12848299
Display P3color(display-p3 0.769 0.047 0.671)

Copy-ready code

/* CSS */
color: #c40cab;
background-color: #c40cab;
/* Tailwind (arbitrary) */
class="text-[#c40cab] bg-[#c40cab]"
/* SCSS */
$brand: #c40cab;
/* SwiftUI */
Color(red: 0.769, green: 0.047, blue: 0.671)
/* Android */
Color.parseColor("#c40cab")
/* Flutter */
Color(0xFFC40CAB)
/* Python / OpenCV (BGR) */
(171, 12, 196)

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

Accessibility — WCAG contrast

Aa
#c40cab on white: 5.27:1
AA ✓ pass · AA-large · AAA
Aa
#c40cab on black: 3.99:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #0E5CAF
deuteranopia · #5E75A7
tritanopia · #CE2765

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #c40cab 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
#FAE5F8
#F8C4F1
#F995EB
#F560E1
#F22CD7
#E70EC9
#c40cab
#9A0986
#6F0B61
#45073D
Base = 700Lightest = 50 · #FDF2FBDarkest = 950 · #45073D
:root {
  --brand-50: #FDF2FB;
  --brand-100: #FAE5F8;
  --brand-200: #F8C4F1;
  --brand-300: #F995EB;
  --brand-400: #F560E1;
  --brand-500: #F22CD7;
  --brand-600: #E70EC9;
  --brand-700: #c40cab;
  --brand-800: #9A0986;
  --brand-900: #6F0B61;
  --brand-950: #45073D;
  --brand: #c40cab;
  --brand-ink: #ffffff;
}

Colors that work with #c40cab

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#9B4B90
Captions on the surface
Accent#1EC408
Second voice, not a rival
Dark variant#780769
Hover, pressed, headers
Light variant#FEE7FA
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 #c40cab

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#0CC425
Analogous left#810CC4
Analogous right#C40C4F
Split-complement 1#4FC40C
Split-complement 2#0CC481
Triadic 1#ABC40C
Triadic 2#0CABC4
Tetradic#C4810C

RGB percentages

Red76.9%
Green4.7%
Blue67.1%

CMYK percentages

Cyan0.0%
Magenta93.9%
Yellow12.8%
Key (black)23.1%

Color previews

#c40cab text on a black background

contrast 3.99:1

Card sample

#c40cab text on a white background

contrast 5.27:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #c40cab

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.

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

#c40cab, answered

What color is #c40cab?

#c40cab is a dark electric magenta / pink, closest to Medium Violet Red (ΔE2000 7.5). It sits at 308° on the hue wheel with 89% saturation and 41% lightness, which reads as neutral.

What is the RGB value of #c40cab?

rgb(196, 12, 171) — 196 red, 12 green and 171 blue out of 255, or 76.9% / 4.7% / 67.1% by channel.

Is #c40cab a light or a dark color?

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

Should I use black or white text on #c40cab?

White. It scores 5.27:1 against #c40cab, versus 3.99:1 for black — AA at any size.

What is the complementary color of #c40cab?

#0CC425 sits directly opposite on the wheel. Softer options are the split-complements #4FC40C and #0CC481, which give the same contrast with far less vibration.

What colors go well with #c40cab?

For interface work: #FAF4FA as the surface, #EDC0E7 for borders, #9B4B90 for secondary text, #1EC408 as an accent and #780769 for hover and pressed states. For a palette, the analogous pair #810CC4 and #C40C4F stays calm, while #0CC425 is the loudest partner.

What is #c40cab in CMYK for printing?

cmyk(0%, 94%, 13%, 23%). 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 #c40cab warm or cool?

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

Work with #c40cab in the Color Lab