Skip to content

#cf157c

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

RGB
207, 21, 124
HSL
327°, 82%, 45%
CMYK
0, 90, 40, 19
Luminance
0.1526

At a glance

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

Hex
#cf157c
Hue
327°
magenta / pink
Saturation
82%
electric
Lightness
45%
dark
Brightness
81%
HSV value
Perceived
48%
weighted brightness
Luminance
0.1526
WCAG relative
Temperature
Warm
35/100 cool
Color family
Magenta / pink
Tone
Electric
Best ink
White
5.18:1
Closest name
Medium Violet Red
ΔE2000 3.2
Where it sits
Hue327° of 360°
Saturation82%
Lightness45%
Temperature
Warm ← → Cool35% 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#cf157c
RGBrgb(207, 21, 124)
HSLhsl(327, 82%, 45%)
CMYKcmyk(0%, 90%, 40%, 19%)
LABlab(46.0 71.9 -7.7)
LCHlch(46.0 72.3 353.9)
OKLCHoklch(0.564 0.223 355.0)
Decimal13571452
Display P3color(display-p3 0.812 0.082 0.486)

Copy-ready code

/* CSS */
color: #cf157c;
background-color: #cf157c;
/* Tailwind (arbitrary) */
class="text-[#cf157c] bg-[#cf157c]"
/* SCSS */
$brand: #cf157c;
/* SwiftUI */
Color(red: 0.812, green: 0.082, blue: 0.486)
/* Android */
Color.parseColor("#cf157c")
/* Flutter */
Color(0xFFCF157C)
/* Python / OpenCV (BGR) */
(124, 21, 207)

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

Accessibility — WCAG contrast

Aa
#cf157c on white: 5.18:1
AA ✓ pass · AA-large · AAA
Aa
#cf157c on black: 4.05:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #46587E
deuteranopia · #797878
tritanopia · #E0004A

Color scale — 50 to 950

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

#FCF2F8
#F9E6F1
#F6C6E0
#F599CC
#F066B2
#EA3399
#cf157c
#B9136F
#940F59
#6B0F42
#430A29
Base = 600Lightest = 50 · #FCF2F8Darkest = 950 · #430A29
:root {
  --brand-50: #FCF2F8;
  --brand-100: #F9E6F1;
  --brand-200: #F6C6E0;
  --brand-300: #F599CC;
  --brand-400: #F066B2;
  --brand-500: #EA3399;
  --brand-600: #cf157c;
  --brand-700: #B9136F;
  --brand-800: #940F59;
  --brand-900: #6B0F42;
  --brand-950: #430A29;
  --brand: #cf157c;
  --brand-ink: #ffffff;
}

Colors that work with #cf157c

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#FAF4F8
Tinted page background
Border#EDC0D9
Hairlines and dividers
Muted text#9B4B77
Captions on the surface
Accent#0EBE31
Second voice, not a rival
Dark variant#740C45
Hover, pressed, headers
Light variant#FDE8F3
Selected rows, tints
Dark surface#24141D
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 #cf157c

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#15CF68
Analogous left#C515CF
Analogous right#CF151F
Split-complement 1#1FCF15
Split-complement 2#15CFC5
Triadic 1#7CCF15
Triadic 2#157CCF
Tetradic#CFC515

RGB percentages

Red81.2%
Green8.2%
Blue48.6%

CMYK percentages

Cyan0.0%
Magenta89.9%
Yellow40.1%
Key (black)18.8%

Color previews

#cf157c text on a black background

contrast 4.05:1

Card sample

#cf157c text on a white background

contrast 5.18:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(207, 21, 124, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(207, 21, 124, 0.45);
Border & gradient
Gradient panel
border: 3px solid #cf157c;
background: linear-gradient(135deg, #cf157c, #CF2A15);

Monochromatic scale

Palettes built from #cf157c

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.

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

#cf157c, answered

What color is #cf157c?

#cf157c is a dark electric magenta / pink, closest to Medium Violet Red (ΔE2000 3.2). It sits at 327° on the hue wheel with 82% saturation and 45% lightness, which reads as warm.

What is the RGB value of #cf157c?

rgb(207, 21, 124) — 207 red, 21 green and 124 blue out of 255, or 81.2% / 8.2% / 48.6% by channel.

Is #cf157c a light or a dark color?

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

Should I use black or white text on #cf157c?

White. It scores 5.18:1 against #cf157c, versus 4.05:1 for black — AA at any size.

What is the complementary color of #cf157c?

#15CF68 sits directly opposite on the wheel. Softer options are the split-complements #1FCF15 and #15CFC5, which give the same contrast with far less vibration.

What colors go well with #cf157c?

For interface work: #FAF4F8 as the surface, #EDC0D9 for borders, #9B4B77 for secondary text, #0EBE31 as an accent and #740C45 for hover and pressed states. For a palette, the analogous pair #C515CF and #CF151F stays calm, while #15CF68 is the loudest partner.

What is #cf157c in CMYK for printing?

cmyk(0%, 90%, 40%, 19%). 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 #cf157c warm or cool?

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

Work with #cf157c in the Color Lab