Skip to content

#2f2255

a deep, soft violet · warm · closest name: midnightblue

RGB
47, 34, 85
HSL
255°, 43%, 23%
CMYK
45, 60, 0, 67
Luminance
0.0240

Every format

HEX#2f2255
RGBrgb(47, 34, 85)
HSLhsl(255, 43%, 23%)
CMYKcmyk(45%, 60%, 0%, 67%)
LABlab(17.5 20.2 -29.0)
LCHlch(17.5 35.3 304.8)
OKLCHoklch(0.297 0.089 291.8)

Copy-ready code

/* CSS */
color: #2f2255;
background-color: #2f2255;
/* Tailwind (arbitrary) */
class="text-[#2f2255] bg-[#2f2255]"
/* SCSS */
$brand: #2f2255;
/* SwiftUI */
Color(red: 0.184, green: 0.133, blue: 0.333)
/* Android */
Color.parseColor("#2f2255")

Accessibility — WCAG contrast

Aa
#2f2255 on white: 14.18:1
AA ✓ pass · AA-large · AAA
Aa
#2f2255 on black: 1.48:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red18.4%
Green13.3%
Blue33.3%

CMYK percentages

Cyan44.7%
Magenta60.0%
Yellow0.0%
Key (black)66.7%

Color previews

#2f2255 text on a black background

contrast 1.48:1

Card sample

#2f2255 text on a white background

contrast 14.18:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #2f2255;
Background color
Panel with #2f2255 background
background-color: #2f2255;
Text shadow — hex

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(47, 34, 85, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(47, 34, 85, 0.45);
Border & gradient
Gradient panel
border: 3px solid #2f2255;
background: linear-gradient(135deg, #2f2255, #512255);

Monochromatic scale

Palettes built from #2f2255

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #2f2255 in the Color Lab