Skip to content

#7940df

a balanced, vivid violet · warm · closest name: slateblue

RGB
121, 64, 223
HSL
262°, 71%, 56%
CMYK
46, 71, 0, 13
Luminance
0.1306

Every format

HEX#7940df
RGBrgb(121, 64, 223)
HSLhsl(262, 71%, 56%)
CMYKcmyk(46%, 71%, 0%, 13%)
LABlab(42.9 58.1 -72.0)
LCHlch(42.9 92.5 308.9)
OKLCHoklch(0.533 0.225 293.7)

Copy-ready code

/* CSS */
color: #7940df;
background-color: #7940df;
/* Tailwind (arbitrary) */
class="text-[#7940df] bg-[#7940df]"
/* SCSS */
$brand: #7940df;
/* SwiftUI */
Color(red: 0.475, green: 0.251, blue: 0.875)
/* Android */
Color.parseColor("#7940df")

Accessibility — WCAG contrast

Aa
#7940df on white: 5.81:1
AA ✓ pass · AA-large · AAA
Aa
#7940df on black: 3.61:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red47.5%
Green25.1%
Blue87.5%

CMYK percentages

Cyan45.7%
Magenta71.3%
Yellow0.0%
Key (black)12.5%

Color previews

#7940df text on a black background

contrast 3.61:1

Card sample

#7940df text on a white background

contrast 5.81:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #7940df;
Background color
Panel with #7940df background
background-color: #7940df;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #7940df;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(121, 64, 223, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(121, 64, 223, 0.45);
Border & gradient
Gradient panel
border: 3px solid #7940df;
background: linear-gradient(135deg, #7940df, #DF40DB);

Monochromatic scale

Palettes built from #7940df

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #7940df in the Color Lab