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

Color data visualization; easily map numerical domain to a smooth-transitioning color range.

example/rainbow_vis_example.dart

import 'package:rainbow_vis/rainbow_vis.dart';

void main() {
  print("Red -> White -> Green");
  var rwg = Rainbow(
      spectrum: ["#ff0000", 'white', '00FF00'],
      rangeStart: -0.5,
      rangeEnd: 0.5);
  for (var v = -1.0; v <= 1.0; v = v + .25) {
    print('rwgb[$v] -> ${rwg[v]}');
  }
  print('');

  print("Red -> Blue");
  var rb = Rainbow(spectrum: ['red', 'blue'], rangeStart: 0, rangeEnd: 10);
  for (var i = 0; i <= 3; i++) {
    var third = 10 * i / 3;
    print('rb[$third] -> ${rb[third]}');
  }
}
4
likes
120
pub points
45%
popularity

Publisher

verified publisherstarheightmedia.com

Color data visualization; easily map numerical domain to a smooth-transitioning color range.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

collection, meta

More

Packages that depend on rainbow_vis