#1f8021
a dark, vivid green · cool · closest name: forestgreen
RGB
31, 128, 33
HSL
121°, 61%, 31%
CMYK
76, 0, 74, 50
Luminance
0.1584
Every format
| HEX | #1f8021 |
| RGB | rgb(31, 128, 33) |
| HSL | hsl(121, 61%, 31%) |
| CMYK | cmyk(76%, 0%, 74%, 50%) |
| LAB | lab(46.8 -46.4 41.5) |
| LCH | lch(46.8 62.3 138.2) |
| OKLCH | oklch(0.526 0.157 143.2) |
Copy-ready code
/* CSS */
color: #1f8021;
background-color: #1f8021;
/* Tailwind (arbitrary) */
class="text-[#1f8021] bg-[#1f8021]"
/* SCSS */
$brand: #1f8021;
/* SwiftUI */
Color(red: 0.122, green: 0.502, blue: 0.129)
/* Android */
Color.parseColor("#1f8021")Accessibility — WCAG contrast
Aa
#1f8021 on white: 5.04:1
AA ✓ pass · AA-large ✓ · AAA ✗
Aa
#1f8021 on black: 4.17:1
AA ✗ fail · AA-large ✓ · AAA ✗
true color
protanopia
deuteranopia
tritanopia
RGB percentages
Red12.2%
Green50.2%
Blue12.9%
CMYK percentages
Cyan75.8%
Magenta0.0%
Yellow74.2%
Key (black)49.8%
Color previews
#1f8021 text on a black background
contrast 4.17:1
Card sample
#1f8021 text on a white background
contrast 5.04:1
Card sample
CSS3 live lab
Text font color
The quick brown fox
color: #1f8021;
Background color
Panel with #1f8021 background
background-color: #1f8021;
Text shadow — hex
Glowing headline
text-shadow: 2px 2px 8px #1f8021;
Text shadow — RGB
Soft neon halo
text-shadow: 0 0 14px rgba(31, 128, 33, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(31, 128, 33, 0.45);
Border & gradient
Gradient panel
border: 3px solid #1f8021; background: linear-gradient(135deg, #1f8021, #1F8062);