Pinned Loading
-
Turn a string ( username e.g ) into ...
Turn a string ( username e.g ) into a RGB ( 15e5de ) . Only put the hashtag in front of it. 1// Turn a string ( like a username , into a RGB code (15e5de) , you can use this for styling purposes per user in chat examples
2hashCode(str) { // java String#hashCode
3var hash = 0;
4for (var i = 0; i < str.length; i++) {
5hash = str.charCodeAt(i) + ((hash << 5) - hash);
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.