Skip to content

#1f50ff

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

RGB
31, 80, 255
HSL
227°, 100%, 56%
CMYK
88, 69, 0, 0
Luminance
0.1325

Every format

HEX#1f50ff
RGBrgb(31, 80, 255)
HSLhsl(227, 100%, 56%)
CMYKcmyk(88%, 69%, 0%, 0%)
LABlab(43.1 49.7 -89.8)
LCHlch(43.1 102.7 298.9)
OKLCHoklch(0.529 0.262 265.1)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#1f50ff on white: 5.75:1
AA ✓ pass · AA-large · AAA
Aa
#1f50ff on black: 3.65:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red12.2%
Green31.4%
Blue100.0%

CMYK percentages

Cyan87.8%
Magenta68.6%
Yellow0.0%
Key (black)0.0%

Color previews

#1f50ff text on a black background

contrast 3.65:1

Card sample

#1f50ff text on a white background

contrast 5.75:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #1f50ff;
Background color
Panel with #1f50ff background
background-color: #1f50ff;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #1f50ff;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(31, 80, 255, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(31, 80, 255, 0.45);
Border & gradient
Gradient panel
border: 3px solid #1f50ff;
background: linear-gradient(135deg, #1f50ff, #831FFF);

Monochromatic scale

Palettes built from #1f50ff

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #1f50ff in the Color Lab