Skip to content

#7f5ce2

a balanced, vivid violet · cool · closest name: Medium Slate Blue

RGB
127, 92, 226
HSL
256°, 70%, 62%
CMYK
44, 59, 0, 11
Luminance
0.1766

At a glance

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

Hex
#7f5ce2
Hue
256°
violet
Saturation
70%
vivid
Lightness
62%
balanced
Brightness
89%
HSV value
Perceived
49%
weighted brightness
Luminance
0.1766
WCAG relative
Temperature
Cool
75/100 cool
Color family
Violet
Tone
Vivid
Best ink
White
4.63:1
Closest name
Medium Slate Blue
ΔE2000 4.1
Where it sits
Hue256° of 360°
Saturation70%
Lightness62%
Temperature
Warm ← → Cool75% 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#7f5ce2
RGBrgb(127, 92, 226)
HSLhsl(256, 70%, 62%)
CMYKcmyk(44%, 59%, 0%, 11%)
LABlab(49.1 45.3 -63.6)
LCHlch(49.1 78.1 305.5)
OKLCHoklch(0.580 0.195 291.1)
Decimal8346850
Display P3color(display-p3 0.498 0.361 0.886)

Copy-ready code

/* CSS */
color: #7f5ce2;
background-color: #7f5ce2;
/* Tailwind (arbitrary) */
class="text-[#7f5ce2] bg-[#7f5ce2]"
/* SCSS */
$brand: #7f5ce2;
/* SwiftUI */
Color(red: 0.498, green: 0.361, blue: 0.886)
/* Android */
Color.parseColor("#7f5ce2")
/* Flutter */
Color(0xFF7F5CE2)
/* Python / OpenCV (BGR) */
(226, 92, 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 #7f5ce2 · 4.63:1
Use #ffffffAA at every size, AAA for large text only.
Aa
White text · 4.63:1 · recommended
AA pass · AA large pass · AAA fail
Aa
Black text · 4.53:1
AA pass · AA large pass · AAA fail
Reading the other direction: #7f5ce2 as text scores 4.63:1 on white and 4.53:1 on black.

Accessibility — WCAG contrast

Aa
#7f5ce2 on white: 4.63:1
AA ✓ pass · AA-large · AAA
Aa
#7f5ce2 on black: 4.53:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #0077E6
deuteranopia · #0072DF
tritanopia · #627A96

Color scale — 50 to 950

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

#F5F3FC
#ECE7F8
#D4C9F2
#B4A0EE
#7f5ce2
#6940DD
#5225D0
#441FAD
#36198B
#2A1665
#1B0E3F
Base = 400Lightest = 50 · #F5F3FCDarkest = 950 · #1B0E3F
:root {
  --brand-50: #F5F3FC;
  --brand-100: #ECE7F8;
  --brand-200: #D4C9F2;
  --brand-300: #B4A0EE;
  --brand-400: #7f5ce2;
  --brand-500: #6940DD;
  --brand-600: #5225D0;
  --brand-700: #441FAD;
  --brand-800: #36198B;
  --brand-900: #2A1665;
  --brand-950: #1B0E3F;
  --brand: #7f5ce2;
  --brand-ink: #ffffff;
}

Colors that work with #7f5ce2

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#F6F4FA
Tinted page background
Border#CCC0ED
Hairlines and dividers
Muted text#604B9B
Captions on the surface
Accent#AFB11B
Second voice, not a rival
Dark variant#2B136C
Hover, pressed, headers
Light variant#EEE9FB
Selected rows, tints
Dark surface#181424
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 #7f5ce2

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

Works well for
  • Body text and links 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
  • 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#BFE25C
Analogous left#5C7CE2
Analogous right#C25CE2
Split-complement 1#E2C25C
Split-complement 2#7CE25C
Triadic 1#E27F5C
Triadic 2#5CE27F
Tetradic#E25C7C

RGB percentages

Red49.8%
Green36.1%
Blue88.6%

CMYK percentages

Cyan43.8%
Magenta59.3%
Yellow0.0%
Key (black)11.4%

Color previews

#7f5ce2 text on a black background

contrast 4.53:1

Card sample

#7f5ce2 text on a white background

contrast 4.63:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #7f5ce2

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.

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

#7f5ce2, answered

What color is #7f5ce2?

#7f5ce2 is a balanced vivid violet, closest to Medium Slate Blue (ΔE2000 4.1). It sits at 256° on the hue wheel with 70% saturation and 62% lightness, which reads as cool.

What is the RGB value of #7f5ce2?

rgb(127, 92, 226) — 127 red, 92 green and 226 blue out of 255, or 49.8% / 36.1% / 88.6% by channel.

Is #7f5ce2 a light or a dark color?

It is a dark color. Relative luminance is 0.1766 and perceived brightness is 49%, so white text on it reaches 4.63:1.

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

White. It scores 4.63:1 against #7f5ce2, versus 4.53:1 for black — AA at any size.

What is the complementary color of #7f5ce2?

#BFE25C sits directly opposite on the wheel. Softer options are the split-complements #E2C25C and #7CE25C, which give the same contrast with far less vibration.

What colors go well with #7f5ce2?

For interface work: #F6F4FA as the surface, #CCC0ED for borders, #604B9B for secondary text, #AFB11B as an accent and #2B136C for hover and pressed states. For a palette, the analogous pair #5C7CE2 and #C25CE2 stays calm, while #BFE25C is the loudest partner.

What is #7f5ce2 in CMYK for printing?

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

Is #7f5ce2 warm or cool?

Cool — it scores 75 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #B05CE2; nudged cooler, #5A69E4.

Work with #7f5ce2 in the Color Lab