#5767 NORM Future : Chat messages not very readable if the person has light colors
Zarro Boogs per Child
bugtracker at laptop.org
Sat May 24 16:12:34 EDT 2008
#5767: Chat messages not very readable if the person has light colors
----------------------------+-----------------------------------------------
Reporter: sjoerd | Owner: morgs
Type: defect | Status: new
Priority: normal | Milestone: Future Release
Component: chat-activity | Version:
Resolution: | Keywords: relnote
Verified: 0 | Blocking:
Blockedby: |
----------------------------+-----------------------------------------------
Comment(by matthias):
One solution would be to choose a text color depending on the background.
The following lines solves this for me:
{{{
#!python
color_fill_rgba = Color(color_fill).get_rgba()
color_fill_gray = (color_fill_rgba[0] + color_fill_rgba[1] +
color_fill_rgba[2])/3
...
if color_fill_gray < 0.5:
text_color = COLOR_WHITE.get_int()
else:
text_color = COLOR_BLACK.get_int()
}}}
--
Ticket URL: <http://dev.laptop.org/ticket/5767#comment:5>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system
More information about the Bugs
mailing list