Skip to content

ardcore/string-to-color

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

String to color

Alt text

npm version

Generate time invariant color from any string or any object.

Install

npm install string-to-color

Usage

var generate = require('string-to-color');
var hex = generate('string'); // => "#7f1de4"

or just generate color from any object, even null!

var hex = generate(null); // => "#1ad64b"

Another feature is that when your string contains color name, output will more or less equal to that color

var hex = generate("i am a red fox"); // => "#f03d22"

When multiple colors are provided, they will be mixed with each other

var hex = generate("red green blue"); // => "#7f5b78"

License

MIT.

About

Time invariant color from any object.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%