After four months, I guess we can close the bug as Invalid. If anyone
wants to reopen the bug, go ahead!
** Changed in: gtg
Status: Incomplete => Invalid
--
Background colors with multiple tags inconsistent
https://bugs.launchpad.net/bugs/399532
You received this bug notification because you are a member of Gtg
contributors, which is subscribed to Getting Things GNOME!.
Status in Getting Things GNOME!: Invalid
Bug description:
The background colors in the main display can be inconsistent. I created three
tags with colors: (1) red, (2) pink, and (3) light grey. I then created two
tasks, tagged with (1 + 3) and (2 + 3). The task with (1 + 3) had a lighter
background color than the (2 + 3) task. For me, this is an issue since I was
using the red and pink as clues for energy reserves, and I expected to be able
to skim my tasks and easily see which would require more and less energy.
I found that this is due to the way background colors are made in
backround_color(tags) in color.py. The background color is averaged, and then
if the color is darker than some threshold (60000 / 65535), it is averaged with
white to lighten it. So above, the (2 + 3) was above the threshold, but (1 +
3) was below and then made twice as light.
I have attached a modified colors.py below as one possible solution. Here, I
simply lighten every color by the same amount. (All background colors are made
with 2 parts white and 1 part tag-average). This might be undesirable since it
would lighten colors that do not need lightening. (This is probably the
intention of the original code.)
More complex solutions can made to try to balance the two issues. I briefly
tried making a "variable lightening" formula where light colors were barely
lightened and darker colors were lightened significantly more, which might
work, in pseudo-code:
red = avg(tags.red)
green = avg(tags.green)
blue = avg(tags.blue)
bright = avg(red,green,blue)
bright = bright / MAX_BRIGHT # map black -> 0; grey -> .5; white -> 1
percent_tag_color = 1/3 + bright * 2/3 # map black -> 1/3; grey -> 2/3; white
-> 1
red = red * percent_tag_color + MAX_BRIGHT * (1 - percent_tag_color) # weighted
average of red and white
green = green * percent_tag_color + MAX_BRIGHT * (1 - percent_tag_color)
blue = blue * percent_tag_color + MAX_BRIGHT * (1 - percent_tag_color)
_______________________________________________
Mailing list: https://launchpad.net/~gtg
Post to : [email protected]
Unsubscribe : https://launchpad.net/~gtg
More help : https://help.launchpad.net/ListHelp