rainbow_vis 0.0.1 copy "rainbow_vis: ^0.0.1" to clipboard
rainbow_vis: ^0.0.1 copied to clipboard

outdatedDart 1 only

Color data visualization; easily map numbers to a smooth-transitioning color legend.

rainbowvis-dart #

Pub Travis

Color data visualization; easily map numbers to a smooth-transitioning color legend. This is a port of the RainbowVis-JS written by anomal.

Usage #

Instantiate a Rainbow, e.g.

  Rainbow rb0 = new Rainbow(); //[0,100],red-yellow-green-blue
  Rainbow rb1 = new Rainbow(minNum:-10, maxNum: 10); 
  Rainbow rb2 = new Rainbow.fromArray(['red', 'FFFFFF', '#00ff00']);
  Rainbow rb3 = new Rainbow.fromArray(['red', 'blue'], minNum: -0.5, maxNum: 0.5);

To interpolate a color among the spectrum, use the list access operator, e.g.

  Rainbow rb0 = new Rainbow(minNum:-10, maxNum: 10); 
  var myColdColor = rb0[-9.32];
  var myWarmCOlor = rb0[8.44];

Testing #

To run on vm (default): pub run test As usual, tests can be run on other platforms with -p<platform>

4
likes
25
pub points
42%
popularity

Publisher

verified publisherstarheightmedia.com

Color data visualization; easily map numbers to a smooth-transitioning color legend.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

More

Packages that depend on rainbow_vis