A simple add-on for generating random colors
- Ember.js v3.24 or above
- Ember CLI v3.24 or above
- Node.js v12 or above
ember install ember-cli-randomcolor
Inject the randomColor service, and called the generate() method.
class MyController extends Controller {
@service
randomColor;
@tracked
colors;
@action
generate () {
this.colors = this.randomColor.generate ();
}
}This add-on is a wrapper for the randomColor package.
The generate() method therefore takes an options parameter, which are the same options for randomColor().
See the Contributing guide for details.
This project is licensed under the MIT License.