Skip to content

#5f2afb

a balanced, electric violet · warm · closest name: blue

RGB
95, 42, 251
HSL
255°, 96%, 58%
CMYK
62, 83, 0, 2
Luminance
0.1105

Every format

HEX#5f2afb
RGBrgb(95, 42, 251)
HSLhsl(255, 96%, 58%)
CMYKcmyk(62%, 83%, 0%, 2%)
LABlab(39.7 71.4 -93.2)
LCHlch(39.7 117.4 307.5)
OKLCHoklch(0.513 0.275 282.3)

Copy-ready code

/* CSS */
color: #5f2afb;
background-color: #5f2afb;
/* Tailwind (arbitrary) */
class="text-[#5f2afb] bg-[#5f2afb]"
/* SCSS */
$brand: #5f2afb;
/* SwiftUI */
Color(red: 0.373, green: 0.165, blue: 0.984)
/* Android */
Color.parseColor("#5f2afb")

Accessibility — WCAG contrast

Aa
#5f2afb on white: 6.54:1
AA ✓ pass · AA-large · AAA
Aa
#5f2afb on black: 3.21:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red37.3%
Green16.5%
Blue98.4%

CMYK percentages

Cyan62.2%
Magenta83.3%
Yellow0.0%
Key (black)1.6%

Color previews

#5f2afb text on a black background

contrast 3.21:1

Card sample

#5f2afb text on a white background

contrast 6.54:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #5f2afb

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #5f2afb in the Color Lab