Skip to content

#5b0ccc

a dark, electric violet · cool · closest name: Medium Blue

RGB
91, 12, 204
HSL
265°, 89%, 42%
CMYK
55, 94, 0, 20
Luminance
0.0685

At a glance

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

Hex
#5b0ccc
Hue
265°
violet
Saturation
89%
electric
Lightness
42%
dark
Brightness
80%
HSV value
Perceived
34%
weighted brightness
Luminance
0.0685
WCAG relative
Temperature
Cool
70/100 cool
Color family
Violet
Tone
Electric
Best ink
White
8.86:1
Closest name
Medium Blue
ΔE2000 6.5
Where it sits
Hue265° of 360°
Saturation89%
Lightness42%
Temperature
Warm ← → Cool70% 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#5b0ccc
RGBrgb(91, 12, 204)
HSLhsl(265, 89%, 42%)
CMYKcmyk(55%, 94%, 0%, 20%)
LABlab(31.4 67.7 -80.0)
LCHlch(31.4 104.8 310.3)
OKLCHoklch(0.441 0.244 289.5)
Decimal5967052
Display P3color(display-p3 0.357 0.047 0.800)

Copy-ready code

/* CSS */
color: #5b0ccc;
background-color: #5b0ccc;
/* Tailwind (arbitrary) */
class="text-[#5b0ccc] bg-[#5b0ccc]"
/* SCSS */
$brand: #5b0ccc;
/* SwiftUI */
Color(red: 0.357, green: 0.047, blue: 0.800)
/* Android */
Color.parseColor("#5b0ccc")
/* Flutter */
Color(0xFF5B0CCC)
/* Python / OpenCV (BGR) */
(204, 12, 91)

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

Accessibility — WCAG contrast

Aa
#5b0ccc on white: 8.86:1
AA ✓ pass · AA-large · AAA
Aa
#5b0ccc on black: 2.37:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #004DD1
deuteranopia · #0046C9
tritanopia · #2A5278

Color scale — 50 to 950

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

#F6F2FD
#EEE5FB
#D9C4F8
#BE95F9
#9E60F6
#7D2BF3
#670EE7
#5b0ccc
#45099A
#340B6F
#210746
Base = 700Lightest = 50 · #F6F2FDDarkest = 950 · #210746
:root {
  --brand-50: #F6F2FD;
  --brand-100: #EEE5FB;
  --brand-200: #D9C4F8;
  --brand-300: #BE95F9;
  --brand-400: #9E60F6;
  --brand-500: #7D2BF3;
  --brand-600: #670EE7;
  --brand-700: #5b0ccc;
  --brand-800: #45099A;
  --brand-900: #340B6F;
  --brand-950: #210746;
  --brand: #5b0ccc;
  --brand-ink: #ffffff;
}

Colors that work with #5b0ccc

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#D2C0ED
Hairlines and dividers
Muted text#6C4B9B
Captions on the surface
Accent#A5C408
Second voice, not a rival
Dark variant#360778
Hover, pressed, headers
Light variant#F0E7FE
Selected rows, tints
Dark surface#1B1424
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 #5b0ccc

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#7DCC0C
Analogous left#0C1DCC
Analogous right#BB0CCC
Split-complement 1#CCBB0C
Split-complement 2#1DCC0C
Triadic 1#CC5B0C
Triadic 2#0CCC5B
Tetradic#CC0C1D

RGB percentages

Red35.7%
Green4.7%
Blue80.0%

CMYK percentages

Cyan55.4%
Magenta94.1%
Yellow0.0%
Key (black)20.0%

Color previews

#5b0ccc text on a black background

contrast 2.37:1

Card sample

#5b0ccc text on a white background

contrast 8.86:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(91, 12, 204, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(91, 12, 204, 0.45);
Border & gradient
Gradient panel
border: 3px solid #5b0ccc;
background: linear-gradient(135deg, #5b0ccc, #CC0CBD);

Monochromatic scale

Palettes built from #5b0ccc

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.

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

#5b0ccc, answered

What color is #5b0ccc?

#5b0ccc is a dark electric violet, closest to Medium Blue (ΔE2000 6.5). It sits at 265° on the hue wheel with 89% saturation and 42% lightness, which reads as cool.

What is the RGB value of #5b0ccc?

rgb(91, 12, 204) — 91 red, 12 green and 204 blue out of 255, or 35.7% / 4.7% / 80% by channel.

Is #5b0ccc a light or a dark color?

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

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

White. It scores 8.86:1 against #5b0ccc, versus 2.37:1 for black — AAA at any size.

What is the complementary color of #5b0ccc?

#7DCC0C sits directly opposite on the wheel. Softer options are the split-complements #CCBB0C and #1DCC0C, which give the same contrast with far less vibration.

What colors go well with #5b0ccc?

For interface work: #F7F4FA as the surface, #D2C0ED for borders, #6C4B9B for secondary text, #A5C408 as an accent and #360778 for hover and pressed states. For a palette, the analogous pair #0C1DCC and #BB0CCC stays calm, while #7DCC0C is the loudest partner.

What is #5b0ccc in CMYK for printing?

cmyk(55%, 94%, 0%, 20%). 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 #5b0ccc 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 #A20CCC; nudged cooler, #130ACE.

Work with #5b0ccc in the Color Lab