#5f2cab
a dark, vivid violet · cool · closest name: Rebecca Purple
At a glance
Every number on this page in one read: what #5f2cab is made of, how bright it looks, and which way it leans.
Reads cool. Warm and cool siblings keep the same lightness, so you can swap one in without redoing your contrast maths.
Every format
| HEX | #5f2cab |
| RGB | rgb(95, 44, 171) |
| HSL | hsl(264, 59%, 42%) |
| CMYK | cmyk(44%, 74%, 0%, 33%) |
| LAB | lab(32.2 49.6 -59.2) |
| LCH | lch(32.2 77.3 310.0) |
| OKLCH | oklch(0.438 0.188 295.9) |
| Decimal | 6237355 |
| Display P3 | color(display-p3 0.373 0.173 0.671) |
Copy-ready code
/* CSS */
color: #5f2cab;
background-color: #5f2cab;
/* Tailwind (arbitrary) */
class="text-[#5f2cab] bg-[#5f2cab]"
/* SCSS */
$brand: #5f2cab;
/* SwiftUI */
Color(red: 0.373, green: 0.173, blue: 0.671)
/* Android */
Color.parseColor("#5f2cab")
/* Flutter */
Color(0xFF5F2CAB)
/* Python / OpenCV (BGR) */
(171, 44, 95)Best text color
Only one of black and white can be right. This is the one, with the number that proves it.
Accessibility — WCAG contrast
Color scale — 50 to 950
A Tailwind-shaped ramp built around this exact hex. #5f2cab 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.
:root {
--brand-50: #F7F4FB;
--brand-100: #EEE9F7;
--brand-200: #DACDEF;
--brand-300: #C0A6E8;
--brand-400: #A179DD;
--brand-500: #824CD1;
--brand-600: #6C32C3;
--brand-700: #5f2cab;
--brand-800: #482182;
--brand-900: #371C5E;
--brand-950: #22113B;
--brand: #5f2cab;
--brand-ink: #ffffff;
}Colors that work with #5f2cab
Not a palette — a role sheet. Each swatch answers one question you will hit while building the component.
Surface, border, heading and body all derive from this one hue, so the screen stays coherent without a second palette.
Lightness flips, hue holds. The accent stays the anchor in both themes.
How to use #5f2cab
Derived from its contrast, chroma and lightness — not from taste.
- ✓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
- ⚠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 | #78AB2C | Directly opposite — maximum tension | |
| Analogous left | #2C39AB | Neighbour, quieter | |
| Analogous right | #9F2CAB | Neighbour, quieter | |
| Split-complement 1 | #AB9F2C | Contrast without the clash | |
| Split-complement 2 | #39AB2C | Contrast without the clash | |
| Triadic 1 | #AB5F2C | Even thirds — balanced and loud | |
| Triadic 2 | #2CAB5F | Even thirds — balanced and loud | |
| Tetradic | #AB2C39 | Fourth corner of the square scheme |
RGB percentages
CMYK percentages
Color previews
#5f2cab text on a black background
contrast 2.43:1
#5f2cab text on a white background
contrast 8.62:1
CSS3 live lab
The quick brown fox
color: #5f2cab;
background-color: #5f2cab;
Glowing headline
text-shadow: 2px 2px 8px #5f2cab;
Soft neon halo
text-shadow: 0 0 14px rgba(95, 44, 171, 0.45);
box-shadow: 0 12px 32px -8px rgba(95, 44, 171, 0.45);
border: 3px solid #5f2cab; background: linear-gradient(135deg, #5f2cab, #AB2CA3);
Monochromatic scale
Palettes built from #5f2cab
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.
Closest color with a full write-up: Indigo (#4b0082) — ΔE2000 9.2 away, with its history, psychology and brand usage.
#5f2cab in the real world
Where a color in this family tends to land, and the interface roles it is usually asked to play.
Converts to four-color process without much drama. Proof it anyway.
#5f2cab, answered
What color is #5f2cab?
#5f2cab is a dark vivid violet, closest to Rebecca Purple (ΔE2000 3.8). It sits at 264° on the hue wheel with 59% saturation and 42% lightness, which reads as cool.
What is the RGB value of #5f2cab?
rgb(95, 44, 171) — 95 red, 44 green and 171 blue out of 255, or 37.3% / 17.3% / 67.1% by channel.
Is #5f2cab a light or a dark color?
It is a dark color. Relative luminance is 0.0717 and perceived brightness is 33%, so white text on it reaches 8.62:1.
Should I use black or white text on #5f2cab?
White. It scores 8.62:1 against #5f2cab, versus 2.43:1 for black — AAA at any size.
What is the complementary color of #5f2cab?
#78AB2C sits directly opposite on the wheel. Softer options are the split-complements #AB9F2C and #39AB2C, which give the same contrast with far less vibration.
What colors go well with #5f2cab?
For interface work: #F7F4FA as the surface, #D2C0ED for borders, #6B4B9B for secondary text, #92A626 as an accent and #381A65 for hover and pressed states. For a palette, the analogous pair #2C39AB and #9F2CAB stays calm, while #78AB2C is the loudest partner.
What is #5f2cab in CMYK for printing?
cmyk(44%, 74%, 0%, 33%). This is a screen-to-ink approximation — ask your printer for a proof before committing to a run.
Is #5f2cab warm or cool?
Cool — it scores 70 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #8E2CAB; nudged cooler, #2E2AAD.