I looked through the source code for the GNOME Power Manager which provides the Power Statistics tool. There seem to be no other documents which explain the colors.
In the answer I point to the lines of code which support the statements I make instead of pasting the code here. See thegpm-statistics.cfile for the lines of code I speak of. The file can be found in thegnome-power-manager-3.16.0.tar.xzarchive. At most places that I mention a color I also mention the RGB values for the color in parenthesis. The code specifies the RGB values in that order too (line 822) as opposed to BGR or some other order.
The source (lines 907-919) revealed that there are more than just the three colors of Red (255,0,0), Green (0,255,0) and Blue (0,0,255). The code makes use of two other shades of Red and Blue, these colors being RedOther (200,0,0) and BlueOther (0,0,200) and a White (255,255,255) as well, although the White shows up only when you pick the "Rate" Graph Type (lines 915-916).
The colors correspond to one of seven states (lines 352-380). These states are:
UP_DEVICE_STATE_CHARGING which is "Charging"
UP_DEVICE_STATE_DISCHARGING which is "Discharging"
UP_DEVICE_STATE_EMPTY which is "Empty"
UP_DEVICE_STATE_FULLY_CHARGED which is "Charged"
UP_DEVICE_STATE_PENDING_CHARGE which is "Waiting to charge"
UP_DEVICE_STATE_PENDING_DISCHARGE which is "Waiting to discharge"
UP_DEVICE_STATE_UNKNOWN which is "Unknown"
The states are assigned colors as (lines 900-919):
"Charging" is Red (255,0,0)
"Discharging" is Blue (0,0,255)
"Waiting to charge" is RedOther (200,0,0) (This probably explains your red-and-discharging comment)
"Waiting to discharge" is BlueOther (0,0,200) (In some experimentation this seemed to show up when I had my laptop plugged in and on standby, so the BlueOther line climbs up)
"Charged" is Green (0,255,0) (Take this with some extra skepticism since I did not understand the code entirely at this point)
"Unknown" has no color assigned. (This too with skepticism)
That said though, I still cannot glean from the code what the "Waiting to discharge" and "Waiting to charge" mean exactly.
After checking power history a few times and remembering what I did, I've concluded it's either extremely complicated and impossible to decipher, or we have to accept some statistical anomalies and it's as simple as
I looked through the source code for the GNOME Power Manager which provides the Power Statistics tool. There seem to be no other documents which explain the colors.
In the answer I point to the lines of code which support the statements I make instead of pasting the code here. See the
gpm-statistics.c
file for the lines of code I speak of. The file can be found in thegnome-power-manager-3.16.0.tar.xz
archive. At most places that I mention a color I also mention the RGB values for the color in parenthesis. The code specifies the RGB values in that order too (line 822) as opposed to BGR or some other order.The source (lines 907-919) revealed that there are more than just the three colors of Red (255,0,0), Green (0,255,0) and Blue (0,0,255). The code makes use of two other shades of Red and Blue, these colors being RedOther (200,0,0) and BlueOther (0,0,200) and a White (255,255,255) as well, although the White shows up only when you pick the "Rate" Graph Type (lines 915-916).
The colors correspond to one of seven states (lines 352-380). These states are:
UP_DEVICE_STATE_CHARGING
which is "Charging"UP_DEVICE_STATE_DISCHARGING
which is "Discharging"UP_DEVICE_STATE_EMPTY
which is "Empty"UP_DEVICE_STATE_FULLY_CHARGED
which is "Charged"UP_DEVICE_STATE_PENDING_CHARGE
which is "Waiting to charge"UP_DEVICE_STATE_PENDING_DISCHARGE
which is "Waiting to discharge"UP_DEVICE_STATE_UNKNOWN
which is "Unknown"The states are assigned colors as (lines 900-919):
That said though, I still cannot glean from the code what the "Waiting to discharge" and "Waiting to charge" mean exactly.
Can't verify 100%, but it seems reasonable that:
green = charging, in use
blue = discharging, in use
red = charging, not in use
After checking power history a few times and remembering what I did, I've concluded it's either extremely complicated and impossible to decipher, or we have to accept some statistical anomalies and it's as simple as