https://github.com/onehilltech/ember-cli-randomcolor
https://github.com/onehilltech/ember-cli-randomcolor
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/onehilltech/ember-cli-randomcolor
- Owner: onehilltech
- License: apache-2.0
- Created: 2022-11-05T13:56:56.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-15T05:52:49.000Z (about 2 years ago)
- Last Synced: 2025-02-27T09:11:49.284Z (2 months ago)
- Language: JavaScript
- Size: 904 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
ember-cli-randomcolor
==============================================================================A simple add-on for generating random colors
Compatibility
------------------------------------------------------------------------------* Ember.js v3.24 or above
* Ember CLI v3.24 or above
* Node.js v12 or aboveInstallation
------------------------------------------------------------------------------```
ember install ember-cli-randomcolor
```Usage
------------------------------------------------------------------------------Inject the `randomColor` service, and called the `generate()` method.
```javascript
class MyController extends Controller {
@service
randomColor;
@tracked
colors;
@action
generate () {
this.colors = this.randomColor.generate ();
}
}
```### Advanced Usage
This add-on is a wrapper for the [randomColor](https://github.com/davidmerfield/randomColor) package.
The `generate()` method therefore takes an `options` parameter, which are the same options for `randomColor()`.Contributing
------------------------------------------------------------------------------See the [Contributing](CONTRIBUTING.md) guide for details.
License
------------------------------------------------------------------------------This project is licensed under the [MIT License](LICENSE.md).