Skip to content

#7f2def

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

RGB
127, 45, 239
HSL
265°, 86%, 56%
CMYK
47, 81, 0, 6
Luminance
0.1262

Every format

HEX#7f2def
RGBrgb(127, 45, 239)
HSLhsl(265, 86%, 56%)
CMYKcmyk(47%, 81%, 0%, 6%)
LABlab(42.2 70.7 -82.2)
LCHlch(42.2 108.4 310.7)
OKLCHoklch(0.534 0.260 294.8)

Copy-ready code

/* CSS */
color: #7f2def;
background-color: #7f2def;
/* Tailwind (arbitrary) */
class="text-[#7f2def] bg-[#7f2def]"
/* SCSS */
$brand: #7f2def;
/* SwiftUI */
Color(red: 0.498, green: 0.176, blue: 0.937)
/* Android */
Color.parseColor("#7f2def")

Accessibility — WCAG contrast

Aa
#7f2def on white: 5.96:1
AA ✓ pass · AA-large · AAA
Aa
#7f2def on black: 3.52:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red49.8%
Green17.6%
Blue93.7%

CMYK percentages

Cyan46.9%
Magenta81.2%
Yellow0.0%
Key (black)6.3%

Color previews

#7f2def text on a black background

contrast 3.52:1

Card sample

#7f2def text on a white background

contrast 5.96:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #7f2def;
Background color
Panel with #7f2def background
background-color: #7f2def;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #7f2def;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(127, 45, 239, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(127, 45, 239, 0.45);
Border & gradient
Gradient panel
border: 3px solid #7f2def;
background: linear-gradient(135deg, #7f2def, #EF2DDE);

Monochromatic scale

Palettes built from #7f2def

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #7f2def in the Color Lab