Is it at all possible to "pull out" the battery status to be used amongst themes?

thinking there must be something in the system that has a
IF Battery >90 Use BatteryBG_17.png 
If battery > 80 use BatteryBG_16.png
Or even status bar info?
mean that has to calculate how many BlackBattery inside.pngs to use... so there must be a file somewhere thats keeping track of this?