Skip to content

Javascript function to convert a string into a hex color code.

License

Notifications You must be signed in to change notification settings

SashaSirotkin/wordhex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wordhex

ES5 function to convert a string into a hex color code. The motivation behind this library is to be able to generate unique and repeatable hex color codes for people's names.

Install

npm install wordhex

Usage

var wordhex = require('wordhex');

// Returns '#1daeea'
wordhex('npm');

// Returns '#FFFFFF'
wordhex('');

// Returns '#78835e'
wordhex('github')

// Still returns '#1daeea'
wordhex('npm');

About

Javascript function to convert a string into a hex color code.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published