Ticket #5767 (closed defect: duplicate)

Opened 6 years ago

Last modified 6 years ago

Chat messages not very readable if the person has light colors

Reported by: sjoerd Owned by: morgs
Priority: normal Milestone: Future Release
Component: chat-activity Version:
Keywords: relnote Cc: gdesmot, Eben
Action Needed: Verified: no
Deployments affected: Blocked By:
Blocking:

Description

Messages from a user with yellow as one of its two colors aren't very readable in the chat activity, because then the messages typed by this user have a yellow background with white letters.

Change History

Changed 6 years ago by jg

  • keywords relnote added
  • milestone changed from Never Assigned to Future Release

Changed 6 years ago by cafl

I'd like to add that "not very readable" should be "totally unreadable". Is there a text color widget that could be added to switch the color of text on the page?

Changed 6 years ago by morgs

It's basically the yellow background that has readability issues with the white text. I'll try increase the font size, since bold white text is readable on the yellow.

Changed 6 years ago by morgs

  • cc Eben added

Eben, this problem occurs in Chat with white text on a yellow background. I don't want to change the font size or style for this one issue, but it is difficult to read.

Changed 6 years ago by matthias

One solution would be to choose a text color depending on the background. The following lines solves this for me:

  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()

Changed 6 years ago by matthias

  • status changed from new to closed
  • resolution set to duplicate

Duplicate of #4240

Changed 6 years ago by morgs

Thanks, I used this patch until we get an answer in #4240.

Note: See TracTickets for help on using tickets.