Skip to content

#4f02ac

a dark, electric violet · cool · closest name: Medium Blue

RGB
79, 2, 172
HSL
267°, 98%, 34%
CMYK
54, 99, 0, 33
Luminance
0.0468

At a glance

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

Hex
#4f02ac
Hue
267°
violet
Saturation
98%
electric
Lightness
34%
dark
Brightness
67%
HSV value
Perceived
28%
weighted brightness
Luminance
0.0468
WCAG relative
Temperature
Cool
68/100 cool
Color family
Violet
Tone
Electric
Best ink
White
10.84:1
Closest name
Medium Blue
ΔE2000 6
Where it sits
Hue267° of 360°
Saturation98%
Lightness34%
Temperature
Warm ← → Cool68% cool

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

Every format

HEX#4f02ac
RGBrgb(79, 2, 172)
HSLhsl(267, 98%, 34%)
CMYKcmyk(54%, 99%, 0%, 33%)
LABlab(25.8 61.1 -70.4)
LCHlch(25.8 93.2 311.0)
OKLCHoklch(0.390 0.217 291.4)
Decimal5178028
Display P3color(display-p3 0.310 0.008 0.675)

Copy-ready code

/* CSS */
color: #4f02ac;
background-color: #4f02ac;
/* Tailwind (arbitrary) */
class="text-[#4f02ac] bg-[#4f02ac]"
/* SCSS */
$brand: #4f02ac;
/* SwiftUI */
Color(red: 0.310, green: 0.008, blue: 0.675)
/* Android */
Color.parseColor("#4f02ac")
/* Flutter */
Color(0xFF4F02AC)
/* Python / OpenCV (BGR) */
(172, 2, 79)

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 #4f02ac · 10.84:1
Use #ffffffAAA at every size.
Aa
White text · 10.84:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 1.94:1
AA fail · AA large fail · AAA fail
Reading the other direction: #4f02ac as text scores 10.84:1 on white and 1.94:1 on black.

Accessibility — WCAG contrast

Aa
#4f02ac on white: 10.84:1
AA ✓ pass · AA-large · AAA
Aa
#4f02ac on black: 1.94:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #003FB0
deuteranopia · #003AA9
tritanopia · #2B4364

Color scale — 50 to 950

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

#F7F1FD
#EFE4FC
#DBC1FB
#C290FE
#A359FD
#8521FC
#6F03F2
#5D02CA
#4f02ac
#380674
#230449
Base = 800Lightest = 50 · #F7F1FDDarkest = 950 · #230449
:root {
  --brand-50: #F7F1FD;
  --brand-100: #EFE4FC;
  --brand-200: #DBC1FB;
  --brand-300: #C290FE;
  --brand-400: #A359FD;
  --brand-500: #8521FC;
  --brand-600: #6F03F2;
  --brand-700: #5D02CA;
  --brand-800: #4f02ac;
  --brand-900: #380674;
  --brand-950: #230449;
  --brand: #4f02ac;
  --brand-ink: #ffffff;
}

Colors that work with #4f02ac

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#F7F4FA
Tinted page background
Border#D4C0ED
Hairlines and dividers
Muted text#6F4B9B
Captions on the surface
Accent#A3CC00
Second voice, not a rival
Dark variant#3A017E
Hover, pressed, headers
Light variant#F1E6FF
Selected rows, tints
Dark surface#1B1424
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 #4f02ac

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
  • Text on black or near-black surfaces
  • 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#5FAC02
Analogous left#020AAC
Analogous right#A402AC
Split-complement 1#ACA402
Split-complement 2#0AAC02
Triadic 1#AC4F02
Triadic 2#02AC4F
Tetradic#AC020A

RGB percentages

Red31.0%
Green0.8%
Blue67.5%

CMYK percentages

Cyan54.1%
Magenta98.8%
Yellow0.0%
Key (black)32.5%

Color previews

#4f02ac text on a black background

contrast 1.94:1

Card sample

#4f02ac text on a white background

contrast 10.84:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(79, 2, 172, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(79, 2, 172, 0.45);
Border & gradient
Gradient panel
border: 3px solid #4f02ac;
background: linear-gradient(135deg, #4f02ac, #AC0298);

Monochromatic scale

Palettes built from #4f02ac

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.

#4f02ac in the real world

Where a color in this family tends to land, and the interface roles it is usually asked to play.

Industries
Creative toolsFintechBeautyLuxury
Common UI roles
ButtonsLinksFocus statesCharts
Print note

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

#4f02ac, answered

What color is #4f02ac?

#4f02ac is a dark electric violet, closest to Medium Blue (ΔE2000 6). It sits at 267° on the hue wheel with 98% saturation and 34% lightness, which reads as cool.

What is the RGB value of #4f02ac?

rgb(79, 2, 172) — 79 red, 2 green and 172 blue out of 255, or 31% / 0.8% / 67.5% by channel.

Is #4f02ac a light or a dark color?

It is a dark color. Relative luminance is 0.0468 and perceived brightness is 28%, so white text on it reaches 10.84:1.

Should I use black or white text on #4f02ac?

White. It scores 10.84:1 against #4f02ac, versus 1.94:1 for black — AAA at any size.

What is the complementary color of #4f02ac?

#5FAC02 sits directly opposite on the wheel. Softer options are the split-complements #ACA402 and #0AAC02, which give the same contrast with far less vibration.

What colors go well with #4f02ac?

For interface work: #F7F4FA as the surface, #D4C0ED for borders, #6F4B9B for secondary text, #A3CC00 as an accent and #3A017E for hover and pressed states. For a palette, the analogous pair #020AAC and #A402AC stays calm, while #5FAC02 is the loudest partner.

What is #4f02ac in CMYK for printing?

cmyk(54%, 99%, 0%, 33%). 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 #4f02ac warm or cool?

Cool — it scores 68 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #8D02AC; nudged cooler, #0F00AE.

Work with #4f02ac in the Color Lab