colorjs / color-space

Math & data behind color spaces and color conversions.
http://colorjs.github.io/color-space
The Unlicense
323 stars 25 forks source link

Add HCG tests #9

Closed ghost closed 8 years ago

ghost commented 8 years ago

Please, wait. I will add support for HCG tests. How to it run? Okay. Try describe:

hcg[0, 0.5, 1] == rgb[255, 128, 128]
hcg[0, 0.5, 0] == rgb[128, 0, 0]
hcg[0, 0.5, 0.5] == rgb[192, 64, 64]
hcg[0, 1, 0] == rgb[255, 0, 0]
hcg[0, 0, 0] == rgb[0, 0, 0]
hcg[0, 0, 1] == rgb[255, 255, 255]
hcg[0, 0.5, 1] == rgb[128, 128, 128]

If not working, try 127 number.

dy commented 8 years ago

npm test

dy commented 8 years ago

See https://github.com/scijs/color-space/blob/master/test/index.js for examples.

ghost commented 8 years ago

I added tests

dy commented 8 years ago

Try just cloning a new repo. There are updated mumath and added .gitignore.