Skip to content

#5a2ab1

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

RGB
90, 42, 177
HSL
261°, 62%, 43%
CMYK
49, 76, 0, 31
Luminance
0.0700

At a glance

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

Hex
#5a2ab1
Hue
261°
violet
Saturation
62%
vivid
Lightness
43%
dark
Brightness
69%
HSV value
Perceived
33%
weighted brightness
Luminance
0.0700
WCAG relative
Temperature
Cool
72/100 cool
Color family
Violet
Tone
Vivid
Best ink
White
8.75:1
Closest name
Rebecca Purple
ΔE2000 5.1
Where it sits
Hue261° of 360°
Saturation62%
Lightness43%
Temperature
Warm ← → Cool72% 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#5a2ab1
RGBrgb(90, 42, 177)
HSLhsl(261, 62%, 43%)
CMYKcmyk(49%, 76%, 0%, 31%)
LABlab(31.8 51.4 -63.4)
LCHlch(31.8 81.6 309.0)
OKLCHoklch(0.435 0.197 292.4)
Decimal5909169
Display P3color(display-p3 0.353 0.165 0.694)

Copy-ready code

/* CSS */
color: #5a2ab1;
background-color: #5a2ab1;
/* Tailwind (arbitrary) */
class="text-[#5a2ab1] bg-[#5a2ab1]"
/* SCSS */
$brand: #5a2ab1;
/* SwiftUI */
Color(red: 0.353, green: 0.165, blue: 0.694)
/* Android */
Color.parseColor("#5a2ab1")
/* Flutter */
Color(0xFF5A2AB1)
/* Python / OpenCV (BGR) */
(177, 42, 90)

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

Accessibility — WCAG contrast

Aa
#5a2ab1 on white: 8.75:1
AA ✓ pass · AA-large · AAA
Aa
#5a2ab1 on black: 2.40:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #004DB5
deuteranopia · #0048AE
tritanopia · #3E4F6C

Color scale — 50 to 950

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

#F6F4FB
#EEE8F7
#D9CCF0
#BDA4E9
#9C77DF
#7B4AD4
#652FC6
#5a2ab1
#431F84
#331B60
#20113C
Base = 700Lightest = 50 · #F6F4FBDarkest = 950 · #20113C
:root {
  --brand-50: #F6F4FB;
  --brand-100: #EEE8F7;
  --brand-200: #D9CCF0;
  --brand-300: #BDA4E9;
  --brand-400: #9C77DF;
  --brand-500: #7B4AD4;
  --brand-600: #652FC6;
  --brand-700: #5a2ab1;
  --brand-800: #431F84;
  --brand-900: #331B60;
  --brand-950: #20113C;
  --brand: #5a2ab1;
  --brand-ink: #ffffff;
}

Colors that work with #5a2ab1

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#D0C0ED
Hairlines and dividers
Muted text#674B9B
Captions on the surface
Accent#9BA923
Second voice, not a rival
Dark variant#341867
Hover, pressed, headers
Light variant#F0EAFA
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 #5a2ab1

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#81B12A
Analogous left#2A3EB1
Analogous right#9D2AB1
Split-complement 1#B19D2A
Split-complement 2#3EB12A
Triadic 1#B15A2A
Triadic 2#2AB15A
Tetradic#B12A3E

RGB percentages

Red35.3%
Green16.5%
Blue69.4%

CMYK percentages

Cyan49.2%
Magenta76.3%
Yellow0.0%
Key (black)30.6%

Color previews

#5a2ab1 text on a black background

contrast 2.40:1

Card sample

#5a2ab1 text on a white background

contrast 8.75:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(90, 42, 177, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(90, 42, 177, 0.45);
Border & gradient
Gradient panel
border: 3px solid #5a2ab1;
background: linear-gradient(135deg, #5a2ab1, #B12AAE);

Monochromatic scale

Palettes built from #5a2ab1

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.

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

#5a2ab1, answered

What color is #5a2ab1?

#5a2ab1 is a dark vivid violet, closest to Rebecca Purple (ΔE2000 5.1). It sits at 261° on the hue wheel with 62% saturation and 43% lightness, which reads as cool.

What is the RGB value of #5a2ab1?

rgb(90, 42, 177) — 90 red, 42 green and 177 blue out of 255, or 35.3% / 16.5% / 69.4% by channel.

Is #5a2ab1 a light or a dark color?

It is a dark color. Relative luminance is 0.0700 and perceived brightness is 33%, so white text on it reaches 8.75:1.

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

White. It scores 8.75:1 against #5a2ab1, versus 2.40:1 for black — AAA at any size.

What is the complementary color of #5a2ab1?

#81B12A sits directly opposite on the wheel. Softer options are the split-complements #B19D2A and #3EB12A, which give the same contrast with far less vibration.

What colors go well with #5a2ab1?

For interface work: #F6F4FA as the surface, #D0C0ED for borders, #674B9B for secondary text, #9BA923 as an accent and #341867 for hover and pressed states. For a palette, the analogous pair #2A3EB1 and #9D2AB1 stays calm, while #81B12A is the loudest partner.

What is #5a2ab1 in CMYK for printing?

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

Is #5a2ab1 warm or cool?

Cool — it scores 72 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #8B2AB1; nudged cooler, #2829B3.

Work with #5a2ab1 in the Color Lab