Opened 10 years ago

Closed 9 years ago

#4534 closed defect (fixed)

Nickname colors in chat windows hard to read

Reported by: kaedenn Owned by: lschiere
Milestone: Patches welcome Component: pidgin (gtk)
Version: 2.3.1 Keywords:
Cc:

Description

The palette of colors used for nicknames is hard to read against the white background. I need to tilt my laptop screen to add more contrast, just to help read the nicknames.

Requesting a plugin to change the format of nicknames and message content for directed and non-directed messages.

Change History (7)

comment:1 Changed 10 years ago by lobais

I've made this python algorithm for generating colors.

If you want 10 colors, you call it with genColor(1), genColor(2), genColor(3)... Then it will genereate 10 colors which looks good, and lies as far from each other on the colors circle as possible.

It will always start at the same place on the colorcircle, so if you don't want all chats to start with a person in red, you can generate a random seed 0-1 and give to all genColor calls in that chat.

def genColor (n, startpoint=0):

assert n >= 1 # This splits the 0 - 1 segment in the pizza way h = (2*n-1)/(2ceil(log(n)/log(2)))-1 h = (h + startpoint) % 1 # We set saturation based on the amount of green, in the range 0.6 to 0.8 rgb = colorsys.hsv_to_rgb(h, 1, 1) rgb = colorsys.hsv_to_rgb(h, 1, (1-rgb[1])*0.2+0.6) return rgb

comment:2 Changed 10 years ago by deryni

  • pending changed from 0 to 1

The algorithm we use for choosing colors needs to be able to avoid already existing colors and avoid clashing or blending with the background, I'm going to assume your python code there does not do that.

kaedenn: Can you take a screenshot of your chat window? I'm curious to see what you are seeing, I have no problem with the colors on a white background here.

comment:3 Changed 10 years ago by kaedenn

  • pending changed from 1 to 0

The problem involves me being outside (or in a well-lit room) with my laptop; the glare and lack of contrast between the default colours and the white background makes the nicknames hard to read, without tilting my laptop screen temporarily.

The problem is with IRC and multi-person chats, not one-on-one messenger.

Furthermore, the lack of contrast from a targeted IRC message makes it very difficult to see who said my nickname last in the chatroom.

Maybe all nicknames could be made somewhat darker and in bold? Furthermore, maybe a targeted nickname could be bold and red, with the message text being bold and dark red?

comment:4 Changed 10 years ago by lobais

The code does avoid already existing colors. If you have 10 people in the room, and the eleventh appear, you get your color by genColor(11).

It doesn't guarantee not to clash with the background color, but it lies in the tango saturation, and works good on white as wall as black backgrounds.

def genColor (n, startpoint=0):
    assert n >= 1
    # This splits the 0 - 1 segment in the pizza way
    h = (2*n-1)/(2**ceil(log(n)/log(2)))-1
    h = (h + startpoint) % 1
    # We set saturation based on the amount of green, in the range 0.6 to 0.8
    rgb = colorsys.hsv_to_rgb(h, 1, 1)
    rgb = colorsys.hsv_to_rgb(h, 1, (1-rgb[1])*0.2+0.6)
    return rgb

comment:5 Changed 10 years ago by happyporker

I could live with an option to turn off the nickname coloring and to set a default for everyone.
Right now these obnoxious shades of cyan/pink/green are raping my eyes and I don't know if any of you had a similar experience, but it's really unpleasant, to say the least.

comment:6 Changed 9 years ago by lschiere

  • Component changed from unclassified to pidgin (gtk)
  • Milestone set to Patches welcome

Too many people use gtk themes that set *some* background color for us to think only of white and black ones. We really need code that generates colors based on the background color. We've tried to do this several times, and theoretically if you work with HSL or HSV colors, you can do this. The trick is to accurately translate to and from the color codes that GTK uses. However, in practice, multiple developers have failed to come up with something that works better for all users than the current code.

The option to disable nickname highlighting would be a valid enhancement request.

comment:7 Changed 9 years ago by lschiere

  • Resolution set to fixed
  • Status changed from new to closed

Looking for the solution for another issue, I realized that the conversation colors plugin will solve the enhancement you request.

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!