Skip to content

#331af9

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

RGB
51, 26, 249
HSL
247°, 95%, 54%
CMYK
80, 90, 0, 2
Luminance
0.0828

Every format

HEX#331af9
RGBrgb(51, 26, 249)
HSLhsl(247, 95%, 54%)
CMYKcmyk(80%, 90%, 0%, 2%)
LABlab(34.6 73.5 -100.7)
LCHlch(34.6 124.7 306.1)
OKLCHoklch(0.469 0.291 270.8)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#331af9 on white: 7.91:1
AA ✓ pass · AA-large · AAA
Aa
#331af9 on black: 2.66:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red20.0%
Green10.2%
Blue97.6%

CMYK percentages

Cyan79.5%
Magenta89.6%
Yellow0.0%
Key (black)2.4%

Color previews

#331af9 text on a black background

contrast 2.66:1

Card sample

#331af9 text on a white background

contrast 7.91:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #331af9

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #331af9 in the Color Lab