I was looking at my power statistics and noticed three different colors are used: green, blue and red. What do they mean?

Power Statistics

  • 1
    Who on earth approved this edit? The guy changed colors to colours and added a comma. This question is 3 years old and viewed 167 times. These kinds of edits shouldn't be encouraged. Do people not read the help section? It literally says "edits are expected to be substantial"
    – duxk.gh
    May 29, 2016 at 22:30
  • Did a rollback, that edit was ridiculous. Meaningful ones that make a question more clear or easier to read are great, but the documentation is pretty clear about tiny edits that make no real difference.
    – duxk.gh
    May 29, 2016 at 22:34

3 Answers 3


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 the gnome-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):

  • "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.


Can't verify 100%, but it seems reasonable that:

green = charging, in use

blue = discharging, in use

red = charging, not in use

  • Maybe. But then how come it was red and still discharging (see image)?
    – duxk.gh
    Oct 26, 2012 at 20:04
  • maybe red = "not in use" perhaps when it was put to sleep and was still draining the battery, then it got plugged in, and eventually turned on (turned to green)
    – valbaca
    Oct 27, 2012 at 2:58
  • It's definitely possible, but if so I'm thinking it might just be a statistical anomaly. If it's gone to sleep it wouldn't use so much power. But the weird thing is that I think I remember when this was because the power went out. And I'm fairly certain I kept using it normally.
    – duxk.gh
    Oct 27, 2012 at 7:16

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

  • Green = charged
  • Blue = discharging
  • Red = charging

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.