Gathering detailed insights and metrics for html-colors
Gathering detailed insights and metrics for html-colors
Gathering detailed insights and metrics for html-colors
Gathering detailed insights and metrics for html-colors
@lrnwebcomponents/simple-colors
Automated conversion of simple-colors/
@lrnwebcomponents/simple-colors-shared-styles
shared styles for simple-colors
@haxtheweb/simple-colors
Automated conversion of simple-colors/
validate-color
Validate HTML colors by 'name', 'special name', 'hex', 'rgb', 'rgba', 'hsl', 'hsla', 'hwb', 'lab' or 'lch' values
Get a list of all the HTML and CSS color names and their hex values.
npm install html-colors
Typescript
Module System
Min. Node Version
Node Version
NPM Version
70
Supply Chain
92
Quality
75.3
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
38,888
Last Day
1
Last Week
17
Last Month
122
Last Year
3,570
MIT License
10 Stars
15 Commits
8 Forks
1 Watchers
1 Branches
3 Contributors
Updated on Oct 05, 2024
Minified
Minified + Gzipped
Latest Version
0.0.6
Package Id
html-colors@0.0.6
Unpacked Size
7.82 kB
Size
3.38 kB
File Count
5
NPM Version
6.4.1
Node Version
8.10.0
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
-45.2%
17
Compared to previous week
Last Month
-17%
122
Compared to previous month
Last Year
-26.6%
3,570
Compared to previous year
1
Get a list of all the HTML and CSS color names and their hex values.
The color list is just a JSON file and can be used wherever.
$ npm install --save html-colors
1const htmlColors = require('html-colors'); 2 3// Get an object with all color names and hex values 4htmlColors.all(); 5//=> { lightgreen: '#90EE90', mediumpurple: '#9370DB', ... } 6 7// Get an array of all the color names 8htmlColors.names(); 9//=> [ 'lightgreen', 'mediumpurple', 'darkviolet', ... ] 10 11// Get the hex color from a color name 12htmlColors.hex('pink'); 13//=> '#FFC0CB' 14 15// Get a random HTML color name 16htmlColors.random(); 17//=> 'antiquewhite'
Get an object with all the HTML color names and their HEX values.
1htmlColors.all(); 2//=> { lightgreen: '#90EE90', mediumpurple: '#9370DB', ... }
Get an array with all the HTML color names.
1htmlColors.names(); 2//=> [ 'lightgreen', 'mediumpurple', 'darkviolet', ... ]
Get the hexadecimal color code from a color name.
Input Type: string
1htmlColors.hex('hotpink'); 2//=> '#FF69B4'
Get a random HTML color name string.
1htmlColors.random(); 2//=> 'peachpuff'
Please feel free to open an issue or send a pull request. Contributions are always welcome.
MIT © Michael Wuergler
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 2/11 approved changesets -- score normalized to 1
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
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
45 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
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