GTG

Use white foreground color when cells have dark background

Bug #1002083 reported by Roquentin
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GTG
Fix Released
Wishlist
Izidor Matušov

Bug Description

Using the urgency color plugin (bug #906516), one may want to mark specific tasks with dark background colors. For instance, overdue or urgent tasks may be marked with a darkish red background. In this case it is better to have a white foreground color - the text is more visible. This has never been a problem so far, since GTG uses a very pale background for tags-based coloring. For urgency-based coloring I think it makes sense to use dark backgrounds.

I propose a simple modification (see patch) to the lilblarch package, so that text is rendered white dynamically depending on the background brightness. The definition of the brightness is taken from here

http://stackoverflow.com/questions/596216/formula-to-determine-brightness-of-rgb-color

It is such that background colors determined using tags do not exceed the threshold, thus the original behavior (black foreground) is reproduced when the plugin is disabled. In a sense, even though the modification is applied globally, it is only active when using the plugin.

Revision history for this message
Roquentin (antonio-roquentin-deactivatedaccount) wrote :
Revision history for this message
Roquentin (antonio-roquentin-deactivatedaccount) wrote :
Izidor Matušov (izidor)
Changed in gtg:
status: New → Triaged
importance: Undecided → Wishlist
assignee: nobody → Izidor Matušov (izidor)
milestone: none → 0.3
Revision history for this message
Izidor Matušov (izidor) wrote :
Changed in gtg:
status: Triaged → Fix Committed
Changed in gtg:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.