@ssts/color
v0.0.3
Published
Create random colors: RGB, HEX or HSL.
Downloads
9
Maintainers
Readme
Create random colors: RGB, HEX or HSL
One straight forward function ~~that~~ returns a random color
| RGB, HEX or HSL 😍
Install
npm i @ssts/color
Import
import seniorCOLOR from "@ssts/color";
Use
const randomColor: string = seniorCOLOR();
Arguments
Returns a string
| Order | Parameter | Type | Default | | :---: | :---------: | :----------------------: | :-----: | | 1 | method | "RGB" | "HEX" | "HSL" | "HEX" |
Examples
import seniorCOLOR from "@ssts/color";
console.log(seniorCOLOR()); // '#25ECAD'
console.log(seniorCOLOR()); // '#EF0FFA'
console.log(seniorCOLOR("HEX")); // '#0C4DC0'
console.log(seniorCOLOR("RGB")); // 'rgb(76, 69, 197)'
console.log(seniorCOLOR("RGB")); // 'rgb(64, 247, 71)'
console.log(seniorCOLOR("RGB")); // 'rgb(254, 78, 233)'
console.log(seniorCOLOR("HSL")); // 'hsl(45, 100%, 50%)'
console.log(seniorCOLOR("HSL")); // 'hsl(251, 100%, 50%)'
console.log(seniorCOLOR("HSL")); // 'hsl(160, 100%, 50%)'
Made With Chocolate By Senior Sedo 😎
Be Chocolateful 💙😍
ssts stands for senior-sedo-typescript 💙
So instead of ~~@senior-sedo-typescript/rand-color~~
@ssts/color
for simplicity sake 😍