Skip to content

#331ff4

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

RGB
51, 31, 244
HSL
246°, 91%, 54%
CMYK
79, 87, 0, 4
Luminance
0.0822

Every format

HEX#331ff4
RGBrgb(51, 31, 244)
HSLhsl(246, 91%, 54%)
CMYKcmyk(79%, 87%, 0%, 4%)
LABlab(34.4 70.7 -98.1)
LCHlch(34.4 120.9 305.8)
OKLCHoklch(0.467 0.284 271.0)

Copy-ready code

/* CSS */
color: #331ff4;
background-color: #331ff4;
/* Tailwind (arbitrary) */
class="text-[#331ff4] bg-[#331ff4]"
/* SCSS */
$brand: #331ff4;
/* SwiftUI */
Color(red: 0.200, green: 0.122, blue: 0.957)
/* Android */
Color.parseColor("#331ff4")

Accessibility — WCAG contrast

Aa
#331ff4 on white: 7.95:1
AA ✓ pass · AA-large · AAA
Aa
#331ff4 on black: 2.64:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red20.0%
Green12.2%
Blue95.7%

CMYK percentages

Cyan79.1%
Magenta87.3%
Yellow0.0%
Key (black)4.3%

Color previews

#331ff4 text on a black background

contrast 2.64:1

Card sample

#331ff4 text on a white background

contrast 7.95:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #331ff4;
Background color
Panel with #331ff4 background
background-color: #331ff4;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #331ff4;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(51, 31, 244, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(51, 31, 244, 0.45);
Border & gradient
Gradient panel
border: 3px solid #331ff4;
background: linear-gradient(135deg, #331ff4, #C11FF4);

Monochromatic scale

Palettes built from #331ff4

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #331ff4 in the Color Lab