Skip to content

Just wanted to create simple function that hashes name and makes coloured circle with leading letter like Google accounts have

Notifications You must be signed in to change notification settings

nov3o/colour-hashing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

colour-hashing

Just wanted to create simple function that hashes name and makes coloured circle with leading letter like Google accounts have

It looks like this:

image

How it works/Usage

Type in console addBubble("Foo") and you add new bubble:
image

My hash function is simple and returns really different colours in case of changing first of last symbol to symbol next to him by ASCII table

aTesta, bTesta and bTestb hashes
image

Function addBubble takes string and creates new bubble

Text colour is black if background colour is light, otherwise it's white

image

You can outcomment and make text have inverted colour of hashed one. Also, you can enable borders. But it looks weird

image

This is just for fun. I just wanted to create name to colour hash function GMail have

About

Just wanted to create simple function that hashes name and makes coloured circle with leading letter like Google accounts have

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published