Gathering detailed insights and metrics for random-color-array-generator
Gathering detailed insights and metrics for random-color-array-generator
Gathering detailed insights and metrics for random-color-array-generator
Gathering detailed insights and metrics for random-color-array-generator
npm install random-color-array-generator
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
11 Commits
1 Watching
1 Branches
1 Contributors
Updated on 27 Jun 2021
JavaScript (91.14%)
CSS (8.86%)
Cumulative downloads
Total Downloads
Last day
-66.7%
2
Compared to previous day
Last week
77.8%
32
Compared to previous week
Last month
-28.4%
126
Compared to previous month
Last year
101.2%
1,821
Compared to previous year
No dependencies detected.
This package enables you to generate random colors array of desired length in different forms (RGB,RGBA,HEX,HSL,HSLA).
This package also provides CSS classes for creating button
1npm i random-color-array-generator
1https://cdn.jsdelivr.net/npm/random-color-array-generator@1.0.3/ColorGeneratorCDN.min.js 2https://cdn.jsdelivr.net/npm/random-color-array-generator@1.0.3/Button.min.css
1https://unpkg.com/random-color-array-generator@1.0.3/ColorGeneratorCDN.min.js 2https://unpkg.com/random-color-array-generator@1.0.3/Button.min.js
1<script src="https://cdn.jsdelivr.net/npm/random-color-array-generator@1.0.3/ColorGeneratorCDN.min.js"></script> 2<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/random-color-array-generator@1.0.3/Button.min.css">
•
└── randomArrayColorGenerator
├── ColorGenerator.min.js
├── ColorGenerator.js
├── Conversions.min.js
├── Conversions.js
├── ColorGeneratorCDN.js
├── ColorGeneratorCDN.min.js
├── Button.css
├── Button.min.css
└── README.md
1import ColorGenerator from "random-color-array-generator/ColorGenerator.min.js"; 2const colorGenerator = new ColorGenerator(sizeOfArray); 3// Here in place of sizeOfArray provide length of array you want like 5 4console.log(colorGenerator.generateRGB()); 5// ['rgb(67,154,213)','rgb(177,96,168)','rgb(230,115,4)','rgb(159,93,46)','rgb(113,177,166)'] 6console.log(colorGenerator.generateHEX()); 7// [ '#8f0e63', '#5caf51', '#46e331', '#e6d0d3', '#13b8ab' ] 8console.log(colorGenerator.generateHSL()); 9// ['hsl(295,62.5%,52.9%)','hsl(40,53.9%,29.8%)','hsl(88,67%,34.5%)','hsl(322,79.5%,49.8%)','hsl(90,37.6%,66.7%)'] 10console.log(colorGenerator.generateHSV()); 11// ['176, 96, 77','63, 71, 61','74, 62, 86','60, 37, 95','232, 81, 98'] 12console.log(colorGenerator.generateRGBA()); 13// ['rgba(21,74,146,0.73)','rgba(107,250,202,0.30)','rgba(241,34,163,0.55)','rgba(114,95,192,0.52)','rgba(213,96,0,0.56)'] 14console.log(colorGenerator.generateHSLA()); 15// ['hsla(7, 41.7%, 70.4%, 0.89)','hsla(314, 97.1%, 41%, 0.73)','hsla(115, 75.2%, 42.7%, 0.79)','hsla(145, 47.4%, 41%, 0.36)','hsla(75, 65.4%, 40.8%, 0.46)']
Function Name | Description | Example Outputs |
---|---|---|
getCurrentSizeOfArray | Return current value which is set for array length | 5 |
setSizeOfArray | Setter for changing value of array length | |
generateRGB | Return array of random rgb values | ['rgb(67,154,213)','rgb(177,96,168)','rgb(230,115,4)','rgb(159,93,46)','rgb(113,177,166)'] |
generateHEX | Return array of random hex values | [ '#8f0e63', '#5caf51', '#46e331', '#e6d0d3', '#13b8ab' ] |
generateHSL | Return array of random hsl values | ['hsl(295,62.5%,52.9%)','hsl(40,53.9%,29.8%)','hsl(88,67%,34.5%)','hsl(322,79.5%,49.8%)','hsl(90,37.6%,66.7%)'] |
generateHSV | Return array of random hsv values | ['176, 96, 77','63, 71, 61','74, 62, 86','60, 37, 95','232, 81, 98'] |
generateRGBA | Return array of random rgba values | ['rgba(21,74,146,0.73)','rgba(107,250,202,0.30)','rgba(241,34,163,0.55)','rgba(114,95,192,0.52)','rgba(213,96,0,0.56)'] |
generateHSLA | Return array of random hsla values | ['hsla(7, 41.7%, 70.4%, 0.89)','hsla(314, 97.1%, 41%, 0.73)','hsla(115, 75.2%, 42.7%, 0.79)','hsla(145, 47.4%, 41%, 0.36)','hsla(75, 65.4%, 40.8%, 0.46)'] |
Class Name | Functioning |
---|---|
custom-generate-button | Generate Base For Button |
button-purple | Provides purple background to button |
button-teal | Provides teal background to button |
button-blue | Provides blue background to button |
button-red | Provides red background to button |
button-yellow | Provides yellow background to button |
button-pink | Provides pink background to button |
1<!-- Import StyleSheet --> 2<script src="https://cdn.jsdelivr.net/npm/random-color-array-generator@1.0.3/ColorGeneratorCDN.min.js"></script> 3<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/random-color-array-generator@1.0.3/Button.min.css"> 4<script> 5 const colorGenerator = new ColorGenerator(5) 6 console.log(colorGenerator.generateHEX()) //["#762775", "#f7f7c5", "#9f4cfa", "#94726d", "#2db4af"] 7</script> 8<button class="custom-generate-button button-pink" id="generate-color">This is custom generate button</button>
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
no SAST tool detected
Details
Reason
Found 0/11 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More