Skip to content

#4d02a2

a dark, electric violet · cool · closest name: Indigo

RGB
77, 2, 162
HSL
268°, 98%, 32%
CMYK
53, 99, 0, 37
Luminance
0.0423

At a glance

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

Hex
#4d02a2
Hue
268°
violet
Saturation
98%
electric
Lightness
32%
dark
Brightness
64%
HSV value
Perceived
27%
weighted brightness
Luminance
0.0423
WCAG relative
Temperature
Cool
68/100 cool
Color family
Violet
Tone
Electric
Best ink
White
11.38:1
Closest name
Indigo
ΔE2000 4.8
Where it sits
Hue268° of 360°
Saturation98%
Lightness32%
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#4d02a2
RGBrgb(77, 2, 162)
HSLhsl(268, 98%, 32%)
CMYKcmyk(53%, 99%, 0%, 37%)
LABlab(24.4 58.7 -66.7)
LCHlch(24.4 88.8 311.4)
OKLCHoklch(0.377 0.208 292.9)
Decimal5046946
Display P3color(display-p3 0.302 0.008 0.635)

Copy-ready code

/* CSS */
color: #4d02a2;
background-color: #4d02a2;
/* Tailwind (arbitrary) */
class="text-[#4d02a2] bg-[#4d02a2]"
/* SCSS */
$brand: #4d02a2;
/* SwiftUI */
Color(red: 0.302, green: 0.008, blue: 0.635)
/* Android */
Color.parseColor("#4d02a2")
/* Flutter */
Color(0xFF4D02A2)
/* Python / OpenCV (BGR) */
(162, 2, 77)

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

Accessibility — WCAG contrast

Aa
#4d02a2 on white: 11.38:1
AA ✓ pass · AA-large · AAA
Aa
#4d02a2 on black: 1.85:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #003CA6
deuteranopia · #0037A0
tritanopia · #2F3E5D

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #4d02a2 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
#DCC1FB
#C390FE
#A659FD
#8821FC
#7303F2
#6002CA
#4d02a2
#3A0674
#240449
Base = 800Lightest = 50 · #F7F1FDDarkest = 950 · #240449
:root {
  --brand-50: #F7F1FD;
  --brand-100: #EFE4FC;
  --brand-200: #DCC1FB;
  --brand-300: #C390FE;
  --brand-400: #A659FD;
  --brand-500: #8821FC;
  --brand-600: #7303F2;
  --brand-700: #6002CA;
  --brand-800: #4d02a2;
  --brand-900: #3A0674;
  --brand-950: #240449;
  --brand: #4d02a2;
  --brand-ink: #ffffff;
}

Colors that work with #4d02a2

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#D5C0ED
Hairlines and dividers
Muted text#704B9B
Captions on the surface
Accent#9FCC00
Second voice, not a rival
Dark variant#3C027E
Hover, pressed, headers
Light variant#F1E6FF
Selected rows, tints
Dark surface#1C1424
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 #4d02a2

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#57A202
Analogous left#0207A2
Analogous right#9D02A2
Split-complement 1#A29D02
Split-complement 2#07A202
Triadic 1#A24D02
Triadic 2#02A24D
Tetradic#A20207

RGB percentages

Red30.2%
Green0.8%
Blue63.5%

CMYK percentages

Cyan52.5%
Magenta98.8%
Yellow0.0%
Key (black)36.5%

Color previews

#4d02a2 text on a black background

contrast 1.85:1

Card sample

#4d02a2 text on a white background

contrast 11.38:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #4d02a2

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.

#4d02a2 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.

#4d02a2, answered

What color is #4d02a2?

#4d02a2 is a dark electric violet, closest to Indigo (ΔE2000 4.8). It sits at 268° on the hue wheel with 98% saturation and 32% lightness, which reads as cool.

What is the RGB value of #4d02a2?

rgb(77, 2, 162) — 77 red, 2 green and 162 blue out of 255, or 30.2% / 0.8% / 63.5% by channel.

Is #4d02a2 a light or a dark color?

It is a dark color. Relative luminance is 0.0423 and perceived brightness is 27%, so white text on it reaches 11.38:1.

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

White. It scores 11.38:1 against #4d02a2, versus 1.85:1 for black — AAA at any size.

What is the complementary color of #4d02a2?

#57A202 sits directly opposite on the wheel. Softer options are the split-complements #A29D02 and #07A202, which give the same contrast with far less vibration.

What colors go well with #4d02a2?

For interface work: #F7F4FA as the surface, #D5C0ED for borders, #704B9B for secondary text, #9FCC00 as an accent and #3C027E for hover and pressed states. For a palette, the analogous pair #0207A2 and #9D02A2 stays calm, while #57A202 is the loudest partner.

What is #4d02a2 in CMYK for printing?

cmyk(53%, 99%, 0%, 37%). 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 #4d02a2 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 #8802A2; nudged cooler, #1100A4.

Work with #4d02a2 in the Color Lab