Skip to content

#7f2ab8

a dark, vivid violet · cool · closest name: Dark Violet

RGB
127, 42, 184
HSL
276°, 63%, 44%
CMYK
31, 77, 0, 28
Luminance
0.0963

At a glance

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

Hex
#7f2ab8
Hue
276°
violet
Saturation
63%
vivid
Lightness
44%
dark
Brightness
72%
HSV value
Perceived
39%
weighted brightness
Luminance
0.0963
WCAG relative
Temperature
Cool
63/100 cool
Color family
Violet
Tone
Vivid
Best ink
White
7.18:1
Closest name
Dark Violet
ΔE2000 4.6
Where it sits
Hue276° of 360°
Saturation63%
Lightness44%
Temperature
Warm ← → Cool63% 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#7f2ab8
RGBrgb(127, 42, 184)
HSLhsl(276, 63%, 44%)
CMYKcmyk(31%, 77%, 0%, 28%)
LABlab(37.2 59.2 -58.7)
LCHlch(37.2 83.3 315.3)
OKLCHoklch(0.485 0.210 307.3)
Decimal8334008
Display P3color(display-p3 0.498 0.165 0.722)

Copy-ready code

/* CSS */
color: #7f2ab8;
background-color: #7f2ab8;
/* Tailwind (arbitrary) */
class="text-[#7f2ab8] bg-[#7f2ab8]"
/* SCSS */
$brand: #7f2ab8;
/* SwiftUI */
Color(red: 0.498, green: 0.165, blue: 0.722)
/* Android */
Color.parseColor("#7f2ab8")
/* Flutter */
Color(0xFF7F2AB8)
/* Python / OpenCV (BGR) */
(184, 42, 127)

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

Accessibility — WCAG contrast

Aa
#7f2ab8 on white: 7.18:1
AA ✓ pass · AA-large · AAA
Aa
#7f2ab8 on black: 2.93:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #0055BC
deuteranopia · #0058B5
tritanopia · #754E70

Color scale — 50 to 950

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

#F8F4FB
#F1E8F7
#E1CCF0
#CEA4EA
#B576E0
#9D48D5
#7f2ab8
#7326A6
#5C1E85
#441A61
#2B103C
Base = 600Lightest = 50 · #F8F4FBDarkest = 950 · #2B103C
:root {
  --brand-50: #F8F4FB;
  --brand-100: #F1E8F7;
  --brand-200: #E1CCF0;
  --brand-300: #CEA4EA;
  --brand-400: #B576E0;
  --brand-500: #9D48D5;
  --brand-600: #7f2ab8;
  --brand-700: #7326A6;
  --brand-800: #5C1E85;
  --brand-900: #441A61;
  --brand-950: #2B103C;
  --brand: #7f2ab8;
  --brand-ink: #ffffff;
}

Colors that work with #7f2ab8

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#F8F4FA
Tinted page background
Border#DBC0ED
Hairlines and dividers
Muted text#7B4B9B
Captions on the surface
Accent#7BAA22
Second voice, not a rival
Dark variant#481868
Hover, pressed, headers
Light variant#F4EAFA
Selected rows, tints
Dark surface#1E1424
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 #7f2ab8

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#63B82A
Analogous left#382AB8
Analogous right#B82AAA
Split-complement 1#AAB82A
Split-complement 2#2AB838
Triadic 1#B87F2A
Triadic 2#2AB87F
Tetradic#B8382A

RGB percentages

Red49.8%
Green16.5%
Blue72.2%

CMYK percentages

Cyan31.0%
Magenta77.2%
Yellow0.0%
Key (black)27.8%

Color previews

#7f2ab8 text on a black background

contrast 2.93:1

Card sample

#7f2ab8 text on a white background

contrast 7.18:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(127, 42, 184, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(127, 42, 184, 0.45);
Border & gradient
Gradient panel
border: 3px solid #7f2ab8;
background: linear-gradient(135deg, #7f2ab8, #B82A92);

Monochromatic scale

Palettes built from #7f2ab8

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.

#7f2ab8 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

Converts to four-color process without much drama. Proof it anyway.

#7f2ab8, answered

What color is #7f2ab8?

#7f2ab8 is a dark vivid violet, closest to Dark Violet (ΔE2000 4.6). It sits at 276° on the hue wheel with 63% saturation and 44% lightness, which reads as cool.

What is the RGB value of #7f2ab8?

rgb(127, 42, 184) — 127 red, 42 green and 184 blue out of 255, or 49.8% / 16.5% / 72.2% by channel.

Is #7f2ab8 a light or a dark color?

It is a dark color. Relative luminance is 0.0963 and perceived brightness is 39%, so white text on it reaches 7.18:1.

Should I use black or white text on #7f2ab8?

White. It scores 7.18:1 against #7f2ab8, versus 2.93:1 for black — AAA at any size.

What is the complementary color of #7f2ab8?

#63B82A sits directly opposite on the wheel. Softer options are the split-complements #AAB82A and #2AB838, which give the same contrast with far less vibration.

What colors go well with #7f2ab8?

For interface work: #F8F4FA as the surface, #DBC0ED for borders, #7B4B9B for secondary text, #7BAA22 as an accent and #481868 for hover and pressed states. For a palette, the analogous pair #382AB8 and #B82AAA stays calm, while #63B82A is the loudest partner.

What is #7f2ab8 in CMYK for printing?

cmyk(31%, 77%, 0%, 28%). This is a screen-to-ink approximation — ask your printer for a proof before committing to a run.

Is #7f2ab8 warm or cool?

Cool — it scores 63 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #B32AB8; nudged cooler, #4A28BA.

Work with #7f2ab8 in the Color Lab