8000 GitHub - zenozeng/color-hash at v0.1.0
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Generate color based on the given string (using HSL color space and SHA256).

License

Notifications You must be signed in to change notification settings

zenozeng/color-hash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Color Hash

Generate color based on the given string.

Status

Still coding.

License

MIT.

Demo

https://zenozeng.github.io/color-hash/demo/

Usage

Browser

A UMD version of ColorHash was located in dist/.

Note that Array.prototype.map was used in color-hash, a pollfill must be provided if you want to use it in IE8.

Node.JS

npm install color-hash --save
var ColorHash = require('color-hash');

FAQ

Why not LAB?

虽然 LAB 的色彩分布对人眼要更加线性一些,但是色域要更大,转换过程要更加复杂。 考虑的一个关键点在于,HSL 色彩空间可以很方便地控制参数, 比如亮度和饱和度,这样生成出来的颜色都是一个比较均匀和谐的分布。

Dev

Test

sudo npm install -g mocha
npm test

Coverage Report

https://zenozeng.github.io/color-hash/test/coverage.html

Build browser js

sudo npm install -g browserify
npm run build

Follow Semantic Versioning

http://semver.org/lang/zh-CN/

About

Generate color based on the given string (using HSL color space and SHA256).

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published
0