Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same letter different colors #30

Open
panfanky opened this issue Jun 20, 2017 · 0 comments
Open

Same letter different colors #30

panfanky opened this issue Jun 20, 2017 · 0 comments

Comments

@panfanky
Copy link

panfanky commented Jun 20, 2017

Hi,
it seems to me the plugin is designed to give same letter the same color, although it is a different username. I think it's better to make the color dependent on something else than the first letter - same color of two different initials can cause no confusion, but what can cause confusing the users is the same color of the same letter.
I propose (made this for myself as a workaround) changing around line 76
this:

var colorIndex = Math.floor((c.charCodeAt(0) + settings.seed) % colors.length);
to something like this:
var colorIndex = Math.floor((settings.name.charCodeAt(1) + settings.name.charCodeAt(3) + settings.seed) % colors.length);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant