#42ac21
a dark, vivid green · cool · closest name: forestgreen
RGB
66, 172, 33
HSL
106°, 68%, 40%
CMYK
62, 0, 81, 33
Luminance
0.3077
Every format
| HEX | #42ac21 |
| RGB | rgb(66, 172, 33) |
| HSL | hsl(106, 68%, 40%) |
| CMYK | cmyk(62%, 0%, 81%, 33%) |
| LAB | lab(62.3 -54.4 57.0) |
| LCH | lch(62.3 78.8 133.6) |
| OKLCH | oklch(0.657 0.196 139.8) |
Copy-ready code
/* CSS */
color: #42ac21;
background-color: #42ac21;
/* Tailwind (arbitrary) */
class="text-[#42ac21] bg-[#42ac21]"
/* SCSS */
$brand: #42ac21;
/* SwiftUI */
Color(red: 0.259, green: 0.675, blue: 0.129)
/* Android */
Color.parseColor("#42ac21")Accessibility — WCAG contrast
Aa
#42ac21 on white: 2.94:1
AA ✗ fail · AA-large ✗ · AAA ✗
Aa
#42ac21 on black: 7.15:1
AA ✓ pass · AA-large ✓ · AAA ✓
true color
protanopia
deuteranopia
tritanopia
RGB percentages
Red25.9%
Green67.5%
Blue12.9%
CMYK percentages
Cyan61.6%
Magenta0.0%
Yellow80.8%
Key (black)32.5%
Color previews
#42ac21 text on a black background
contrast 7.15:1
Card sample
#42ac21 text on a white background
contrast 2.94:1
Card sample
CSS3 live lab
Text font color
The quick brown fox
color: #42ac21;
Background color
Panel with #42ac21 background
background-color: #42ac21;
Text shadow — hex
Glowing headline
text-shadow: 2px 2px 8px #42ac21;
Text shadow — RGB
Soft neon halo
text-shadow: 0 0 14px rgba(66, 172, 33, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(66, 172, 33, 0.45);
Border & gradient
Gradient panel
border: 3px solid #42ac21; background: linear-gradient(135deg, #42ac21, #21AC5D);