Skip to content

#7f239d

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

RGB
127, 35, 157
HSL
285°, 64%, 38%
CMYK
19, 78, 0, 38
Luminance
0.0815

At a glance

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

Hex
#7f239d
Hue
285°
violet
Saturation
64%
vivid
Lightness
38%
dark
Brightness
62%
HSV value
Perceived
36%
weighted brightness
Luminance
0.0815
WCAG relative
Temperature
Cool
58/100 cool
Color family
Violet
Tone
Vivid
Best ink
White
7.99:1
Closest name
Dark Magenta
ΔE2000 5
Where it sits
Hue285° of 360°
Saturation64%
Lightness38%
Temperature
Warm ← → Cool58% 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#7f239d
RGBrgb(127, 35, 157)
HSLhsl(285, 64%, 38%)
CMYKcmyk(19%, 78%, 0%, 38%)
LABlab(34.3 56.0 -47.2)
LCHlch(34.3 73.2 319.9)
OKLCHoklch(0.459 0.192 316.1)
Decimal8332189
Display P3color(display-p3 0.498 0.137 0.616)

Copy-ready code

/* CSS */
color: #7f239d;
background-color: #7f239d;
/* Tailwind (arbitrary) */
class="text-[#7f239d] bg-[#7f239d]"
/* SCSS */
$brand: #7f239d;
/* SwiftUI */
Color(red: 0.498, green: 0.137, blue: 0.616)
/* Android */
Color.parseColor("#7f239d")
/* Flutter */
Color(0xFF7F239D)
/* Python / OpenCV (BGR) */
(157, 35, 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 #7f239d · 7.99:1
Use #ffffffAAA at every size.
Aa
White text · 7.99:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 2.63:1
AA fail · AA large fail · AAA fail
Reading the other direction: #7f239d as text scores 7.99:1 on white and 2.63:1 on black.

Accessibility — WCAG contrast

Aa
#7f239d on white: 7.99:1
AA ✓ pass · AA-large · AAA
Aa
#7f239d on black: 2.63:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #004BA0
deuteranopia · #21539A
tritanopia · #7D3E5F

Color scale — 50 to 950

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

#F9F4FB
#F4E8F7
#E7CBF0
#D9A3EB
#C675E0
#B348D6
#A22DC8
#7f239d
#6C1E85
#4F1961
#32103D
Base = 700Lightest = 50 · #F9F4FBDarkest = 950 · #32103D
:root {
  --brand-50: #F9F4FB;
  --brand-100: #F4E8F7;
  --brand-200: #E7CBF0;
  --brand-300: #D9A3EB;
  --brand-400: #C675E0;
  --brand-500: #B348D6;
  --brand-600: #A22DC8;
  --brand-700: #7f239d;
  --brand-800: #6C1E85;
  --brand-900: #4F1961;
  --brand-950: #32103D;
  --brand: #7f239d;
  --brand-ink: #ffffff;
}

Colors that work with #7f239d

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#F9F4FA
Tinted page background
Border#E2C0ED
Hairlines and dividers
Muted text#874B9B
Captions on the surface
Accent#65AB21
Second voice, not a rival
Dark variant#541768
Hover, pressed, headers
Light variant#F6EAFA
Selected rows, tints
Dark surface#201424
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 #7f239d

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#419D23
Analogous left#42239D
Analogous right#9D237E
Split-complement 1#7E9D23
Split-complement 2#239D42
Triadic 1#9D7F23
Triadic 2#239D7F
Tetradic#9D4223

RGB percentages

Red49.8%
Green13.7%
Blue61.6%

CMYK percentages

Cyan19.1%
Magenta77.7%
Yellow0.0%
Key (black)38.4%

Color previews

#7f239d text on a black background

contrast 2.63:1

Card sample

#7f239d text on a white background

contrast 7.99:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(127, 35, 157, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(127, 35, 157, 0.45);
Border & gradient
Gradient panel
border: 3px solid #7f239d;
background: linear-gradient(135deg, #7f239d, #9D236A);

Monochromatic scale

Palettes built from #7f239d

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.

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

#7f239d, answered

What color is #7f239d?

#7f239d is a dark vivid violet, closest to Dark Magenta (ΔE2000 5). It sits at 285° on the hue wheel with 64% saturation and 38% lightness, which reads as cool.

What is the RGB value of #7f239d?

rgb(127, 35, 157) — 127 red, 35 green and 157 blue out of 255, or 49.8% / 13.7% / 61.6% by channel.

Is #7f239d a light or a dark color?

It is a dark color. Relative luminance is 0.0815 and perceived brightness is 36%, so white text on it reaches 7.99:1.

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

White. It scores 7.99:1 against #7f239d, versus 2.63:1 for black — AAA at any size.

What is the complementary color of #7f239d?

#419D23 sits directly opposite on the wheel. Softer options are the split-complements #7E9D23 and #239D42, which give the same contrast with far less vibration.

What colors go well with #7f239d?

For interface work: #F9F4FA as the surface, #E2C0ED for borders, #874B9B for secondary text, #65AB21 as an accent and #541768 for hover and pressed states. For a palette, the analogous pair #42239D and #9D237E stays calm, while #419D23 is the loudest partner.

What is #7f239d in CMYK for printing?

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

Is #7f239d warm or cool?

Cool — it scores 58 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #9D238E; nudged cooler, #52219F.

Work with #7f239d in the Color Lab