Package Exports
- rfs-random-colors
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rfs-random-colors) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
rfs-random-colors
Get random colors (material colors) or random shades of a particular color.
How to use
Include the module in your code:
const { getRandomColor, getRandomShade, colors } = require("rfs-random-colors");
To get a random color:
console.log(getRandomColor()); // #388e3c
To get a random shade of a particular color:
console.log(getRandomShade(colors.Indigo)); // #5c6bc0
Supported Colors
For easy of use, you can use the predefined supported colors
- Red
- Pink
- Purple
- DeepPurple
- Indigo
- Blue
- LightBlue
- Cyan
- Teal
- Green
- LightGreen
- Lime
- Yellow
- Amber
- Orange
- DeepOrange
- Brown
- Grey