From: Shane Synan Date: Fri, 2 Dec 2016 23:35:32 +0000 (-0600) Subject: New default sender colors! X-Git-Tag: travis-deploy-test~321 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=5f13dd167785d830a851b134863dce231ec450dd;hp=5f13dd167785d830a851b134863dce231ec450dd New default sender colors! Add a full range of 16 sender colors, loosely readable and distinguishable. This results in less redundant nickname colors and possibly better readability (subjective). All changes can be undone, as expected. Colors generated with an algorithm suggested to to the Pidgin implementation. Credit to 'lobais' for the original algorithm. Bump settings minor version to preserve old sender colors. This only affects those who have used the git master branch, and if desired can be removed. Algorithm code: 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 See https://developer.pidgin.im/ticket/4534#comment:4 Resolves GH-266. ---