Skip to content

#2f255f

a dark, soft blue · warm · closest name: midnightblue

RGB
47, 37, 95
HSL
250°, 44%, 26%
CMYK
51, 61, 0, 63
Luminance
0.0275

Every format

HEX#2f255f
RGBrgb(47, 37, 95)
HSLhsl(250, 44%, 26%)
CMYKcmyk(51%, 61%, 0%, 63%)
LABlab(19.0 21.4 -33.2)
LCHlch(19.0 39.5 302.9)
OKLCHoklch(0.311 0.099 287.1)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#2f255f on white: 13.54:1
AA ✓ pass · AA-large · AAA
Aa
#2f255f on black: 1.55:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red18.4%
Green14.5%
Blue37.3%

CMYK percentages

Cyan50.5%
Magenta61.1%
Yellow0.0%
Key (black)62.7%

Color previews

#2f255f text on a black background

contrast 1.55:1

Card sample

#2f255f text on a white background

contrast 13.54:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(47, 37, 95, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(47, 37, 95, 0.45);
Border & gradient
Gradient panel
border: 3px solid #2f255f;
background: linear-gradient(135deg, #2f255f, #56255F);

Monochromatic scale

Palettes built from #2f255f

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #2f255f in the Color Lab