Skip to content

#5f2eb4

a dark, vivid violet · cool · closest name: Rebecca Purple

RGB
95, 46, 180
HSL
262°, 59%, 44%
CMYK
47, 74, 0, 29
Luminance
0.0768

At a glance

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

Hex
#5f2eb4
Hue
262°
violet
Saturation
59%
vivid
Lightness
44%
dark
Brightness
71%
HSV value
Perceived
34%
weighted brightness
Luminance
0.0768
WCAG relative
Temperature
Cool
71/100 cool
Color family
Violet
Tone
Vivid
Best ink
White
8.28:1
Closest name
Rebecca Purple
ΔE2000 4.9
Where it sits
Hue262° of 360°
Saturation59%
Lightness44%
Temperature
Warm ← → Cool71% 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#5f2eb4
RGBrgb(95, 46, 180)
HSLhsl(262, 59%, 44%)
CMYKcmyk(47%, 74%, 0%, 29%)
LABlab(33.3 51.1 -62.8)
LCHlch(33.3 80.9 309.1)
OKLCHoklch(0.448 0.196 293.5)
Decimal6237876
Display P3color(display-p3 0.373 0.180 0.706)

Copy-ready code

/* CSS */
color: #5f2eb4;
background-color: #5f2eb4;
/* Tailwind (arbitrary) */
class="text-[#5f2eb4] bg-[#5f2eb4]"
/* SCSS */
$brand: #5f2eb4;
/* SwiftUI */
Color(red: 0.373, green: 0.180, blue: 0.706)
/* Android */
Color.parseColor("#5f2eb4")
/* Flutter */
Color(0xFF5F2EB4)
/* Python / OpenCV (BGR) */
(180, 46, 95)

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

Accessibility — WCAG contrast

Aa
#5f2eb4 on white: 8.28:1
AA ✓ pass · AA-large · AAA
Aa
#5f2eb4 on black: 2.54:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #0050B8
deuteranopia · #004CB1
tritanopia · #45526F

Color scale — 50 to 950

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

#F6F4FB
#EEE9F7
#D9CDEF
#BEA6E8
#9D79DD
#7D4CD1
#5f2eb4
#562AA2
#452182
#341C5F
#21113B
Base = 600Lightest = 50 · #F6F4FBDarkest = 950 · #21113B
:root {
  --brand-50: #F6F4FB;
  --brand-100: #EEE9F7;
  --brand-200: #D9CDEF;
  --brand-300: #BEA6E8;
  --brand-400: #9D79DD;
  --brand-500: #7D4CD1;
  --brand-600: #5f2eb4;
  --brand-700: #562AA2;
  --brand-800: #452182;
  --brand-900: #341C5F;
  --brand-950: #21113B;
  --brand: #5f2eb4;
  --brand-ink: #ffffff;
}

Colors that work with #5f2eb4

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#F7F4FA
Tinted page background
Border#D0C0ED
Hairlines and dividers
Muted text#684B9B
Captions on the surface
Accent#98A725
Second voice, not a rival
Dark variant#361A66
Hover, pressed, headers
Light variant#F0EBFA
Selected rows, tints
Dark surface#1A1424
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 #5f2eb4

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#83B42E
Analogous left#2E40B4
Analogous right#A22EB4
Split-complement 1#B4A22E
Split-complement 2#40B42E
Triadic 1#B45F2E
Triadic 2#2EB45F
Tetradic#B42E40

RGB percentages

Red37.3%
Green18.0%
Blue70.6%

CMYK percentages

Cyan47.2%
Magenta74.4%
Yellow0.0%
Key (black)29.4%

Color previews

#5f2eb4 text on a black background

contrast 2.54:1

Card sample

#5f2eb4 text on a white background

contrast 8.28:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #5f2eb4;
Background color
Panel with #5f2eb4 background
background-color: #5f2eb4;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #5f2eb4;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(95, 46, 180, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(95, 46, 180, 0.45);
Border & gradient
Gradient panel
border: 3px solid #5f2eb4;
background: linear-gradient(135deg, #5f2eb4, #B42EB0);

Monochromatic scale

Palettes built from #5f2eb4

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.

#5f2eb4 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.

#5f2eb4, answered

What color is #5f2eb4?

#5f2eb4 is a dark vivid violet, closest to Rebecca Purple (ΔE2000 4.9). It sits at 262° on the hue wheel with 59% saturation and 44% lightness, which reads as cool.

What is the RGB value of #5f2eb4?

rgb(95, 46, 180) — 95 red, 46 green and 180 blue out of 255, or 37.3% / 18% / 70.6% by channel.

Is #5f2eb4 a light or a dark color?

It is a dark color. Relative luminance is 0.0768 and perceived brightness is 34%, so white text on it reaches 8.28:1.

Should I use black or white text on #5f2eb4?

White. It scores 8.28:1 against #5f2eb4, versus 2.54:1 for black — AAA at any size.

What is the complementary color of #5f2eb4?

#83B42E sits directly opposite on the wheel. Softer options are the split-complements #B4A22E and #40B42E, which give the same contrast with far less vibration.

What colors go well with #5f2eb4?

For interface work: #F7F4FA as the surface, #D0C0ED for borders, #684B9B for secondary text, #98A725 as an accent and #361A66 for hover and pressed states. For a palette, the analogous pair #2E40B4 and #A22EB4 stays calm, while #83B42E is the loudest partner.

What is #5f2eb4 in CMYK for printing?

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

Is #5f2eb4 warm or cool?

Cool — it scores 71 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #902EB4; nudged cooler, #2C2CB6.

Work with #5f2eb4 in the Color Lab