Gradient

Bonsai provides four factories for making linear or radial gradients:

Try it out:

var s = new Rect(0, 0, 200, 100);
s.addTo(stage);
s.fill(
  gradient.linear('top right', ['red', ['yellow', 80], 'blue'])
);

Sample gradients