Sorry, I am not sure I understand what are you trying to make, but if you want the colors to smoothly change from green trough yellow to red as the battery depletes, then try it like I described it in this thread:
Sorry, I am not sure I understand what are you trying to make, but if you want the colors to smoothly change from green trough yellow to red as the battery depletes, then try it like I described it in this thread: