GNOME Bugzilla – Bug 349190
Don't hard-code colors
Last modified: 2020-11-15 14:12:27 UTC
Boabab has hard-coded colors in the form of PNG files that it scales/crops/whatever to make the status bars. This will cause problems for themes. In addition, the red and green that are being used are nearly identical to people with red-green color deficiency. Boabab should extract colors from the user's current theme, and then draw the bar graphs with Cairo or something.
Definately. Do you know if there are this kind of cell renderers already available somewhere (gtk's progressbar cellrenderer is not very sexy for this stuff)
btw, which theme colors can we use? Displaing just a progress with the standard widget colors doesn't cut it
So I see on trunk that you're no longer using the PNG images, but instead are drawing the bars. The colors are still hard-coded though. The green is much different from what the green PNG looked like, and it's no longer isdistinguishable from the red. Unfortunately, it's now indistinguishable from the yellow. You should really try to calculate the colors from the user's theme. You can look at how Yelp does this: http://svn.gnome.org/viewcvs/yelp/trunk/src/yelp-settings.c?revision=2742&view=markup I'd like to rework most of that, but it's a start. You still have to take care that auto-generated colors are color-blind-friendly. A good approach is to vary the saturation or brigthness value along with the hue. This sequence will probably work well: Low-saturated blue-tinted green Medium-saturated everyday yellow High-saturated bright red Giving the green a blueish tint will help distinguish it from both yellow and red. This is, by the way, exactly the approach taken by traffic lights in the US.
This bug was reported against a version which is not supported any more. Developers are no longer working on this version so there will not be any bug fixes for it. Can you please check again if the issue you reported here still happens in a recent version of GNOME and update this report by adding a comment and adjusting the 'Version' field? Again thank you for reporting this and sorry that it could not be fixed for the version you originally used here. Without feedback this report will be closed as INCOMPLETE after 6 weeks.
The developers can't ascertain for themselves whether the program still works this way? NEEDINFO should only be used when you actually need info from the reporter, not when you could find the info yourself.
Hi, actually I don't have that problem on my machine. Colors in baobab are very distinguishable, but I guess that's more a personal threshold, and I'm not even colorblind. I have set this NEEDINFO because it was not touched for a long time, and I was trying to triage a bit. Not sure if the colors are still a problem for you, are they? Thanks
Hi Shaun, there's bug 601370 that has a patch (attachment #181149 [details]). Should we consider this a duplicate of 601370, or vice versa?
*** This bug has been marked as a duplicate of bug 601370 ***