Skip to content

A stripped down and optimized version of anomal/RainbowVis-JS

Notifications You must be signed in to change notification settings

charlieclark/rainbow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Rainbow

A stripped down and optimized version of anomal/RainbowVis-JS, more suited for canvas animations etc.

Features

  • removing logs
  • removing some operations
  • removing hardcoded color values
  • optimizing
  • adding node export
  • get color as RGB or HEX

How to use

Visual results are identical to anomal/RainbowVis-JS, however usage is slightly different.

initialize a rainbow with an array of hex values var rainbow = new Rainbow(['#ff0000', '#00ff00', '#0000ff'])

get a color from the spectrum as a hex value var color = rainbow.colorAt(0.5); //00ff00 or as an RGB array var color = rainbow.colorAt(0.5); //[0,255,0]

And that's it!

Todo

  • Example
  • Minified version
  • bower

About

A stripped down and optimized version of anomal/RainbowVis-JS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published