Skip to content

#7f5cf6

a light, electric blue · cool · closest name: Medium Slate Blue

RGB
127, 92, 246
HSL
254°, 90%, 66%
CMYK
48, 63, 0, 4
Luminance
0.1882

At a glance

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

Hex
#7f5cf6
Hue
254°
blue
Saturation
90%
electric
Lightness
66%
light
Brightness
96%
HSV value
Perceived
51%
weighted brightness
Luminance
0.1882
WCAG relative
Temperature
Cool
76/100 cool
Color family
Blue
Tone
Electric
Best ink
Black
4.76:1
Closest name
Medium Slate Blue
ΔE2000 3.4
Where it sits
Hue254° of 360°
Saturation90%
Lightness66%
Temperature
Warm ← → Cool76% 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#7f5cf6
RGBrgb(127, 92, 246)
HSLhsl(254, 90%, 66%)
CMYKcmyk(48%, 63%, 0%, 4%)
LABlab(50.5 50.9 -72.6)
LCHlch(50.5 88.6 305.0)
OKLCHoklch(0.595 0.219 288.3)
Decimal8346870
Display P3color(display-p3 0.498 0.361 0.965)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#7f5cf6 on white: 4.41:1
AA ✗ fail · AA-large · AAA
Aa
#7f5cf6 on black: 4.76:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #007CFB
deuteranopia · #0074F3
tritanopia · #5681A1

Color scale — 50 to 950

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

#F4F2FD
#EAE5FB
#CFC3F8
#AB95F9
#7f5cf6
#582AF3
#3F0DE8
#340BC1
#2A099B
#220B70
#150746
Base = 400Lightest = 50 · #F4F2FDDarkest = 950 · #150746
:root {
  --brand-50: #F4F2FD;
  --brand-100: #EAE5FB;
  --brand-200: #CFC3F8;
  --brand-300: #AB95F9;
  --brand-400: #7f5cf6;
  --brand-500: #582AF3;
  --brand-600: #3F0DE8;
  --brand-700: #340BC1;
  --brand-800: #2A099B;
  --brand-900: #220B70;
  --brand-950: #150746;
  --brand: #7f5cf6;
  --brand-ink: #000000;
}

Colors that work with #7f5cf6

Not a palette — a role sheet. Each swatch answers one question you will hit while building the component.

Text on it#000000
Black wins here
Surface#F6F4FA
Tinted page background
Border#CAC0ED
Hairlines and dividers
Muted text#5D4B9B
Captions on the surface
Accent#C5C107
Second voice, not a rival
Dark variant#210779
Hover, pressed, headers
Light variant#ECE7FE
Selected rows, tints
Dark surface#171424
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 #7f5cf6

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

Works well for
  • Headings from 24px up on white
  • Text and icons on dark surfaces
  • Primary buttons and calls to action
  • Focus rings, active and selected states
  • Card and section backgrounds
  • Brand accents, badges and data highlights
Use with care
  • Small text on white — under 4.5:1
  • Full-page backgrounds — tiring over long sessions
  • White 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#D3F65C
Analogous left#5C86F6
Analogous right#CC5CF6
Split-complement 1#F6CC5C
Split-complement 2#86F65C
Triadic 1#F67F5C
Triadic 2#5CF67F
Tetradic#F65C86

RGB percentages

Red49.8%
Green36.1%
Blue96.5%

CMYK percentages

Cyan48.4%
Magenta62.6%
Yellow0.0%
Key (black)3.5%

Color previews

#7f5cf6 text on a black background

contrast 4.76:1

Card sample

#7f5cf6 text on a white background

contrast 4.41:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #7f5cf6

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.

#7f5cf6 in the real world

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

Industries
TechnologyFinanceHealthcareEnterprise SaaS
Common UI roles
SurfacesBadgesHighlightsEmpty states
Print note

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

#7f5cf6, answered

What color is #7f5cf6?

#7f5cf6 is a light electric blue, closest to Medium Slate Blue (ΔE2000 3.4). It sits at 254° on the hue wheel with 90% saturation and 66% lightness, which reads as cool.

What is the RGB value of #7f5cf6?

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

Is #7f5cf6 a light or a dark color?

It is a mid-tone. Relative luminance is 0.1882 and perceived brightness is 51%, so black text on it reaches 4.76:1.

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

Black. It scores 4.76:1 against #7f5cf6, versus 4.41:1 for white — AA at any size.

What is the complementary color of #7f5cf6?

#D3F65C sits directly opposite on the wheel. Softer options are the split-complements #F6CC5C and #86F65C, which give the same contrast with far less vibration.

What colors go well with #7f5cf6?

For interface work: #F6F4FA as the surface, #CAC0ED for borders, #5D4B9B for secondary text, #C5C107 as an accent and #210779 for hover and pressed states. For a palette, the analogous pair #5C86F6 and #CC5CF6 stays calm, while #D3F65C is the loudest partner.

What is #7f5cf6 in CMYK for printing?

cmyk(48%, 63%, 0%, 4%). 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 #7f5cf6 warm or cool?

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

Work with #7f5cf6 in the Color Lab