Installations
npm install html-colors
Developer Guide
Typescript
No
Module System
N/A
Min. Node Version
>=4
Node Version
8.10.0
NPM Version
6.4.1
Score
69.9
Supply Chain
92
Quality
75.3
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
radiovisual
Download Statistics
Total Downloads
37,683
Last Day
3
Last Week
34
Last Month
227
Last Year
3,723
GitHub Statistics
10 Stars
15 Commits
8 Forks
2 Watching
1 Branches
3 Contributors
Bundle Size
3.91 kB
Minified
1.69 kB
Minified + Gzipped
Package Meta Information
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
Total Downloads
Cumulative downloads
Total Downloads
37,683
Last day
-70%
3
Compared to previous day
Last week
-38.2%
34
Compared to previous week
Last month
62.1%
227
Compared to previous month
Last year
-66.3%
3,723
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
html-colors
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.
Install
$ npm install --save html-colors
Usage
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'
API
.all()
Get an object with all the HTML color names and their HEX values.
1htmlColors.all(); 2//=> { lightgreen: '#90EE90', mediumpurple: '#9370DB', ... }
.names()
Get an array with all the HTML color names.
1htmlColors.names(); 2//=> [ 'lightgreen', 'mediumpurple', 'darkviolet', ... ]
.hex(colorname)
Get the hexadecimal color code from a color name.
Input Type: string
1htmlColors.hex('hotpink'); 2//=> '#FF69B4'
.random()
Get a random HTML color name string.
1htmlColors.random(); 2//=> 'peachpuff'
Contributions
Please feel free to open an issue or send a pull request. Contributions are always welcome.
License
MIT © Michael Wuergler
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: license:0
- Info: FSF or OSI recognized license: MIT License: license:0
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
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 7 are checked with a SAST tool
Reason
44 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-6chw-6frg-f759
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx
- Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm
- Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h
- Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3
- Warn: Project is vulnerable to: MAL-2023-462
- Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37
- Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546
- Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-282f-qqgm-c34q
- Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-fhjf-83wg-r2j9
- Warn: Project is vulnerable to: GHSA-w9mr-4mfr-499f
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp
- Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr
- Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6
- Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj
- Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9
- Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw
- Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc
- Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh
- Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v
Score
1.9
/10
Last Scanned on 2025-01-27
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 MoreOther packages similar to 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