Hi,
Is it possible to identify a terrain color with a number so I can use it within a conditional structure like "If.... then..."?

For example, if I set the terrain color with different shades of green (using "Stamp Grid" and R:0 G:[20+random 82] B:0), how can I identify the resultant terrain color and use it within a conditional statement?
I want my agents to do something based on the different shades (e.g. gaining different units of energy when the green shade is darker).
Thanks!