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

Colorize #2

Open
metasean opened this issue Jun 23, 2015 · 1 comment
Open

Colorize #2

metasean opened this issue Jun 23, 2015 · 1 comment

Comments

@metasean
Copy link
Contributor

Modify colorize to account for different users with same/similar names.

@metasean
Copy link
Contributor Author

Goals

  1. The goal of colorize is to provide deterministic, mostly distinct coloration of usernames and messages (similar to hash-generated gravatars, albeit without any allusions of uniqueness).
  2. It would be nice if the distinct coloration could be overridden on a site-specific level (e.g. for theming purposes)

Areas for Improvement

  1. The generated "color" is currently based just on a 3-32 char username. Multiple people can use the same or similar names. It would be better if we included some other piece of deterministic information to generate slightly more distinct coloration (e.g. http://jsbin.com/gahigi/edit?html,output).
  2. It would be nice to have an easy way to change the hue, saturation, value, & alpha programmatically to approximate theming (e.g. http://jsbin.com/davima/edit?html,js,output)
  3. It may be more optimal to add CSS rules instead of inlining the actual colors (http://stackoverflow.com/questions/31038227/browser-inconsistency-when-using-javascript-to-generate-javascript-to-generate-i?noredirect=1#comment50100421_31038227)

See also - http://devmag.org.za/2012/07/29/how-to-choose-colours-procedurally-algorithms/

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