Bug 258536

Summary: More varied nick colors (random?)
Product: [Applications] konversation Reporter: ned <naught101>
Component: ircviewAssignee: argonel <argonel>
Status: CONFIRMED ---    
Severity: wishlist CC: hein, konversation-devel, matthias, niall.hewitt, richard.llom, shalokshalom, wyatt.epp
Priority: NOR    
Version: 1.3   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: This is a worse case example. Both nicknames start with the same letter and end with numbers. Also the length is pretty much identical.

Description ned 2010-12-02 03:34:36 UTC
Version:           1.3 (using KDE 4.5.3) 
OS:                Linux

At the moment, there's only 8 possible nick colors. I'm not sure how they're distributed among users, but regardless, it's not enough. If you're in a conversation with 5 people, then you have a >50% chance of two of them having the same colour. Right now I'm looking at a conversation with 12 people that has 2 green users, 2 red users and 5(!) pink users. Makes following the conversation very difficult.

I reckon randomly generating colours (perhaps with some kind of limits, eg. avoid clashes with the background colour), and applying them only as people speak for the first time (this avoids wasting colours on idlers) would be great.

A bonus would be to be able to change the color of a nick for the case where two colours are too similar, if not manually, then just re-generate it randomly.

Reproducible: Didn't try

Steps to Reproduce:
enter any busy irc channel and watch.
Comment 1 Eike Hein 2010-12-02 14:15:27 UTC
Randomly generating colors won't fly because the nick coloring has to satisfy two related but different requirements: There should be contrast between nicks to tell them apart more easily, and the same nick should always get the same color so people can be recognized by their color. The latter requirement is why the current algorithm hashes nicknames into one slot in a palette of 8.

We are considering increasing the size of the palette to 16 though to provide more contrast.
Comment 2 Eike Hein 2010-12-02 14:16:18 UTC
Bug 131458 is also related.
Comment 3 Wyatt Epp 2012-03-18 01:24:07 UTC
Would it be possible for users to add as many colours as they desire?  Sort of like how you can add as many workspaces as you want in the desktop KCM.  I'd like at least thirty, but I acknowledge people have differing needs.
Comment 4 Eike Hein 2012-03-18 13:30:03 UTC
Aye, the current plan for the new config dialog is to increase the default palette to 16 colors, but allow users to add/remove colors as they desire. Sorry this is taking so long.
Comment 5 ned 2012-03-20 00:12:44 UTC
I don't think 16 is enough, by default either. You'd still have a >50% chance of two people having the same nick colour in a conversation of 8 people [(15/16)*...*(8/9)=0.5]. In busy channels, this would happen all the time. 

Btw, increasing the number of colours from 8 to 16 will inherrently *decrease* the contrast, not increase it. But it increases the differentiability between nicks, which is what's important. 

Frankly, if you hashed nicknames to a colour in a given "safe" range (let's say to any hue, 60-90% saturation, and luminosity 10-30% for light backgrounds, or 70-90% for dark backgrounds), then you ARE likely to get some colours that are fairly similar, but the chance that they are so similar as to be confusing is still going to be WAY less than if you have a palette of 16, or even 50.

If you decide to stick with a resizable palette, I guess I can always write a script to give me a 100 colours, to make it a bit unlikely to get a clash, but I don't really see myself using a UI for that. I can't imagine anyone's gonna see a palette of 16, and then add another 30-40 colours using the UI, and making sure that they are relatively differentiable. That'd be a huge pain in the arse.
Comment 6 Matthias Mailänder 2015-06-07 12:31:56 UTC
Created attachment 93050 [details]
This is a worse case example. Both nicknames start with the same letter and end with numbers. Also the length is pretty much identical.

The situation might improve if Konversation didn't give nicknames that are already hard to differentiate also the same color to confuse things even further.
Comment 7 Eike Hein 2017-10-26 12:42:51 UTC
*** Bug 386205 has been marked as a duplicate of this bug. ***