Skip to content

#9f4cfb

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

RGB
159, 76, 251
HSL
269°, 96%, 64%
CMYK
37, 70, 0, 2
Luminance
0.1950

At a glance

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

Hex
#9f4cfb
Hue
269°
violet
Saturation
96%
electric
Lightness
64%
balanced
Brightness
98%
HSV value
Perceived
53%
weighted brightness
Luminance
0.1950
WCAG relative
Temperature
Cool
68/100 cool
Color family
Violet
Tone
Electric
Best ink
Black
4.90:1
Closest name
Medium Slate Blue
ΔE2000 8.5
Where it sits
Hue269° of 360°
Saturation96%
Lightness64%
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#9f4cfb
RGBrgb(159, 76, 251)
HSLhsl(269, 96%, 64%)
CMYKcmyk(37%, 70%, 0%, 2%)
LABlab(51.3 66.0 -73.9)
LCHlch(51.3 99.1 311.8)
OKLCHoklch(0.609 0.246 301.0)
Decimal10439931
Display P3color(display-p3 0.624 0.298 0.984)

Copy-ready code

/* CSS */
color: #9f4cfb;
background-color: #9f4cfb;
/* Tailwind (arbitrary) */
class="text-[#9f4cfb] bg-[#9f4cfb]"
/* SCSS */
$brand: #9f4cfb;
/* SwiftUI */
Color(red: 0.624, green: 0.298, blue: 0.984)
/* Android */
Color.parseColor("#9f4cfb")
/* Flutter */
Color(0xFF9F4CFB)
/* Python / OpenCV (BGR) */
(251, 76, 159)

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 #9f4cfb · 4.90:1
Use #000000AA at every size, AAA for large text only.
Aa
White text · 4.28:1
AA fail · AA large pass · AAA fail
Aa
Black text · 4.90:1 · recommended
AA pass · AA large pass · AAA fail
Reading the other direction: #9f4cfb as text scores 4.28:1 on white and 4.90:1 on black.

Accessibility — WCAG contrast

Aa
#9f4cfb on white: 4.28:1
AA ✗ fail · AA-large · AAA
Aa
#9f4cfb on black: 4.90:1
AA ✓ pass · AA-large · AAA
true color
protanopia · #0079FF
deuteranopia · #0079F7
tritanopia · #8B769F

Color scale — 50 to 950

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

#F7F1FD
#EFE4FC
#DCC1FA
#C491FD
#9f4cfb
#8924FA
#7505EF
#6104C8
#4E04A0
#3B0773
#250548
Base = 400Lightest = 50 · #F7F1FDDarkest = 950 · #250548
:root {
  --brand-50: #F7F1FD;
  --brand-100: #EFE4FC;
  --brand-200: #DCC1FA;
  --brand-300: #C491FD;
  --brand-400: #9f4cfb;
  --brand-500: #8924FA;
  --brand-600: #7505EF;
  --brand-700: #6104C8;
  --brand-800: #4E04A0;
  --brand-900: #3B0773;
  --brand-950: #250548;
  --brand: #9f4cfb;
  --brand-ink: #000000;
}

Colors that work with #9f4cfb

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#F7F4FA
Tinted page background
Border#D5C0ED
Hairlines and dividers
Muted text#714B9B
Captions on the surface
Accent#9ECC00
Second voice, not a rival
Dark variant#3D037D
Hover, pressed, headers
Light variant#F2E6FE
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 #9f4cfb

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
  • Brand accents, badges and data highlights
Use with care
  • Small text on white — under 4.5:1
  • 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#A8FB4C
Analogous left#4C50FB
Analogous right#F74CFB
Split-complement 1#FBF74C
Split-complement 2#50FB4C
Triadic 1#FB9F4C
Triadic 2#4CFB9F
Tetradic#FB4C50

RGB percentages

Red62.4%
Green29.8%
Blue98.4%

CMYK percentages

Cyan36.7%
Magenta69.7%
Yellow0.0%
Key (black)1.6%

Color previews

#9f4cfb text on a black background

contrast 4.90:1

Card sample

#9f4cfb text on a white background

contrast 4.28:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #9f4cfb;
Background color
Panel with #9f4cfb background
background-color: #9f4cfb;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #9f4cfb;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(159, 76, 251, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(159, 76, 251, 0.45);
Border & gradient
Gradient panel
border: 3px solid #9f4cfb;
background: linear-gradient(135deg, #9f4cfb, #FB4CE2);

Monochromatic scale

Palettes built from #9f4cfb

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.

#9f4cfb 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.

#9f4cfb, answered

What color is #9f4cfb?

#9f4cfb is a balanced electric violet, closest to Medium Slate Blue (ΔE2000 8.5). It sits at 269° on the hue wheel with 96% saturation and 64% lightness, which reads as cool.

What is the RGB value of #9f4cfb?

rgb(159, 76, 251) — 159 red, 76 green and 251 blue out of 255, or 62.4% / 29.8% / 98.4% by channel.

Is #9f4cfb a light or a dark color?

It is a mid-tone. Relative luminance is 0.1950 and perceived brightness is 53%, so black text on it reaches 4.90:1.

Should I use black or white text on #9f4cfb?

Black. It scores 4.90:1 against #9f4cfb, versus 4.28:1 for white — AA at any size.

What is the complementary color of #9f4cfb?

#A8FB4C sits directly opposite on the wheel. Softer options are the split-complements #FBF74C and #50FB4C, which give the same contrast with far less vibration.

What colors go well with #9f4cfb?

For interface work: #F7F4FA as the surface, #D5C0ED for borders, #714B9B for secondary text, #9ECC00 as an accent and #3D037D for hover and pressed states. For a palette, the analogous pair #4C50FB and #F74CFB stays calm, while #A8FB4C is the loudest partner.

What is #9f4cfb in CMYK for printing?

cmyk(37%, 70%, 0%, 2%). 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 #9f4cfb 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 #DF4CFB; nudged cooler, #5D4AFD.

Work with #9f4cfb in the Color Lab