Skip to content

#1f4c2e

a deep, soft green · cool · closest name: darkslategray

RGB
31, 76, 46
HSL
140°, 42%, 21%
CMYK
59, 0, 40, 70
Luminance
0.0566

Every format

HEX#1f4c2e
RGBrgb(31, 76, 46)
HSLhsl(140, 42%, 21%)
CMYKcmyk(59%, 0%, 40%, 70%)
LABlab(28.5 -23.4 13.3)
LCHlch(28.5 26.9 150.4)
OKLCHoklch(0.376 0.072 152.3)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#1f4c2e on white: 9.85:1
AA ✓ pass · AA-large · AAA
Aa
#1f4c2e on black: 2.13:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red12.2%
Green29.8%
Blue18.0%

CMYK percentages

Cyan59.2%
Magenta0.0%
Yellow39.5%
Key (black)70.2%

Color previews

#1f4c2e text on a black background

contrast 2.13:1

Card sample

#1f4c2e text on a white background

contrast 9.85:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(31, 76, 46, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(31, 76, 46, 0.45);
Border & gradient
Gradient panel
border: 3px solid #1f4c2e;
background: linear-gradient(135deg, #1f4c2e, #1F4C4C);

Monochromatic scale

Palettes built from #1f4c2e

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #1f4c2e in the Color Lab