
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
randomized-colors
Advanced tools
A random utility which allows to create random color variations
#Why you could need this
It might occur to that you you want tol use subtle color variations, Checking the rgb, rgba or (even worse) the hex values of html colors is a cumbersome task. So the idea is that you pass a known color and receive random variations that you can calibrate with a randomness parameter. If you set the randomness parameter to 0, just may use it as a color converter tool too. There might be moments when this could produce nice aesthetic effects, since you are regulating affinties.
#Installation
npm install randomized-colors
#Usage
First you require the library:
var randomized = require("randomized-colors");
Invoking is straightforward: You just write:
var output = randomized("gold", 0.2);
The seconed parameter stands for the randomness of the result: 1 is total randomness, 0 no randomness at all.
You may also use a third parameter, which stands for the format. Valid formats are rgb, rgba, hex, array, object
You would invoke it like this:
var output = randomized("gold", 0.2, "rgba");
Since the function is overloaded it supports a variety of input formats. You may write:
var output = randomized("rgb(32,32,32)", 0,0.2, "object");
// or
var output = randomized("rgb(32,32,32)", 0,0.2, "array");
FAQs
tool for converting html colors and creating randomized variations
The npm package randomized-colors receives a total of 1 weekly downloads. As such, randomized-colors popularity was classified as not popular.
We found that randomized-colors demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.