Why green is #008000 and not #00FF00
Red is #FF0000 and blue is #0000FF, so you would expect green to be #00FF00. In CSS it is not. The keyword green was fixed at #008000 back in the early HTML colour list, and the full-strength value got the name lime. Some colour-name lists, including the community list behind our colour names browser, label #00FF00 as “Green”, so you will see both answers online. If you type green in a stylesheet you get the darker one.
Green, emerald, forest: how the named greens line up
| Name | HEX | HSL | Character |
|---|---|---|---|
| Lime (CSS) | #00FF00 | 120°, 100%, 50% | Neon; almost impossible to read text on or in |
| Green (CSS) | #008000 | 120°, 100%, 25% | Solid, flag-like green |
| Emerald | #028F1E | 132°, 97%, 28% | Turned slightly towards blue, jewel-like |
| Forest green (CSS) | #228B22 | 120°, 61%, 34% | Less saturated, so it looks natural rather than digital |
| Dark green (CSS) | #006400 | 120°, 100%, 20% | Deeper than green, good behind white text |
The deeper dives are on emerald green and forest green.
Green buttons and success messages
White on #008000 scores 5.14:1, which passes AA for normal text. Lime is the trap: white text on it manages 1.37:1, and even lime text on white is unreadable. For a “saved” or “paid” badge, a mid green such as CSS green, or Tailwind's green-600 (#16A34A) with a dark label, is the safer starting point.
Pairings
Green with white and gold looks traditional and outdoorsy (think sports clubs and garden centres). Green with cream softens it for packaging and interiors. The screen complement of green is magenta, a pairing that only works when one of the two is very small.
Questions
What is the RGB code for green?
CSS green is rgb(0, 128, 0). Lime, the brightest green a screen shows, is rgb(0, 255, 0).
Which green should I use for a logo?
Neither of the pure values, usually. Pick a green you like from the strip above, then check it in the contrast checker against the background it will sit on.