Skip to content

#f02afc

a balanced, electric magenta / pink · neutral · closest name: Magenta

RGB
240, 42, 252
HSL
297°, 97%, 58%
CMYK
5, 83, 0, 1
Luminance
0.2721

At a glance

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

Hex
#f02afc
Hue
297°
magenta / pink
Saturation
97%
electric
Lightness
58%
balanced
Brightness
99%
HSV value
Perceived
63%
weighted brightness
Luminance
0.2721
WCAG relative
Temperature
Neutral
52/100 cool
Color family
Magenta / pink
Tone
Electric
Best ink
Black
6.44:1
Closest name
Magenta
ΔE2000 2
Where it sits
Hue297° of 360°
Saturation97%
Lightness58%
Temperature
Warm ← → Cool52% 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#f02afc
RGBrgb(240, 42, 252)
HSLhsl(297, 97%, 58%)
CMYKcmyk(5%, 83%, 0%, 1%)
LABlab(59.2 91.0 -61.1)
LCHlch(59.2 109.6 326.1)
OKLCHoklch(0.688 0.301 325.5)
Decimal15739644
Display P3color(display-p3 0.941 0.165 0.988)

Copy-ready code

/* CSS */
color: #f02afc;
background-color: #f02afc;
/* Tailwind (arbitrary) */
class="text-[#f02afc] bg-[#f02afc]"
/* SCSS */
$brand: #f02afc;
/* SwiftUI */
Color(red: 0.941, green: 0.165, blue: 0.988)
/* Android */
Color.parseColor("#f02afc")
/* Flutter */
Color(0xFFF02AFC)
/* Python / OpenCV (BGR) */
(252, 42, 240)

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

Accessibility — WCAG contrast

Aa
#f02afc on white: 3.26:1
AA ✗ fail · AA-large · AAA
Aa
#f02afc on black: 6.44:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #0080FF
deuteranopia · #6096F7
tritanopia · #F65898

Color scale — 50 to 950

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

#FDF1FD
#FAE4FC
#F7C1FB
#F790FD
#F359FD
#f02afc
#E403F1
#BE03C9
#9802A1
#6E0674
#450448
Base = 500Lightest = 50 · #FDF1FDDarkest = 950 · #450448
:root {
  --brand-50: #FDF1FD;
  --brand-100: #FAE4FC;
  --brand-200: #F7C1FB;
  --brand-300: #F790FD;
  --brand-400: #F359FD;
  --brand-500: #f02afc;
  --brand-600: #E403F1;
  --brand-700: #BE03C9;
  --brand-800: #9802A1;
  --brand-900: #6E0674;
  --brand-950: #450448;
  --brand: #f02afc;
  --brand-ink: #000000;
}

Colors that work with #f02afc

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

Text on it#000000
Black wins here
Surface#FAF4FA
Tinted page background
Border#EAC0ED
Hairlines and dividers
Muted text#964B9B
Captions on the surface
Accent#3ECC00
Second voice, not a rival
Dark variant#77027E
Hover, pressed, headers
Light variant#FDE6FF
Selected rows, tints
Dark surface#241424
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 #f02afc

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

Works well for
  • Headings from 24px up on white
  • Text and icons on dark surfaces
  • Primary buttons and calls to action
  • Focus rings, active and selected states
  • Brand accents, badges and data highlights
Use with care
  • Small text on white — under 4.5:1
  • 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#36FC2A
Analogous left#872AFC
Analogous right#FC2A9F
Split-complement 1#9FFC2A
Split-complement 2#2AFC87
Triadic 1#FCF02A
Triadic 2#2AFCF0
Tetradic#FC872A

RGB percentages

Red94.1%
Green16.5%
Blue98.8%

CMYK percentages

Cyan4.8%
Magenta83.3%
Yellow0.0%
Key (black)1.2%

Color previews

#f02afc text on a black background

contrast 6.44:1

Card sample

#f02afc text on a white background

contrast 3.26:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(240, 42, 252, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(240, 42, 252, 0.45);
Border & gradient
Gradient panel
border: 3px solid #f02afc;
background: linear-gradient(135deg, #f02afc, #FC2A7C);

Monochromatic scale

Palettes built from #f02afc

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.

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

#f02afc, answered

What color is #f02afc?

#f02afc is a balanced electric magenta / pink, closest to Magenta (ΔE2000 2). It sits at 297° on the hue wheel with 97% saturation and 58% lightness, which reads as neutral.

What is the RGB value of #f02afc?

rgb(240, 42, 252) — 240 red, 42 green and 252 blue out of 255, or 94.1% / 16.5% / 98.8% by channel.

Is #f02afc a light or a dark color?

It is a mid-tone. Relative luminance is 0.2721 and perceived brightness is 63%, so black text on it reaches 6.44:1.

Should I use black or white text on #f02afc?

Black. It scores 6.44:1 against #f02afc, versus 3.26:1 for white — AA at any size.

What is the complementary color of #f02afc?

#36FC2A sits directly opposite on the wheel. Softer options are the split-complements #9FFC2A and #2AFC87, which give the same contrast with far less vibration.

What colors go well with #f02afc?

For interface work: #FAF4FA as the surface, #EAC0ED for borders, #964B9B for secondary text, #3ECC00 as an accent and #77027E for hover and pressed states. For a palette, the analogous pair #872AFC and #FC2A9F stays calm, while #36FC2A is the loudest partner.

What is #f02afc in CMYK for printing?

cmyk(5%, 83%, 0%, 1%). 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 #f02afc warm or cool?

Neutral — it scores 52 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #FC2ABB; nudged cooler, #A328FE.

Work with #f02afc in the Color Lab