
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
A JavaScript color parsing and manipulation library designed for convenience and flexibility (rather than runtime performance).
A JavaScript color parsing and manipulation library designed for convenience and flexibility (rather than runtime performance).
See the User Guide for examples and full documentation.
var color = require("sc-color");
var c0 = color("#0c7").hue("+30").hex6(); // returns "#00bbcc"
var c1 = color("red")
.saturation(20)
.tone(.35)
.alpha(.5)
.html(); // returns "rgba(211,177,177,0.5)"
The library is intended to support many color formats. See the full documentation for all formats.
color('orange');
color('#FC3');
color('rgb(128,64,200)');
color('hsl', 200, 90, 90);
color('hsv', [200, 90, 90]);
The parsing formats are also available as output formats:
var orange = color('orange');
orange.html();
orange.hex6();
orange.hex3();
orange.html('keyword');
orange.complement().html('keyword');
The library supports many operations for manipulating a given color. Change the color saturation, reduce the amount of green, blend with another color, find the color's complement, find a different tone of the same base color, etc.
var c = color('#F00');
c = c.blend('yellow', .25);
c.hue('-30');
c.hue('+=30');
c = c.saturation(50).shade(.5).tint(.3);
c.complement();
c.complement().hueSet();
c.blend('lawngreen','55%').hueRange(60,9);
npm test - run the unit testsPull requests and issues are welcome. If you want proactively contribute, see the TODO file for ways to contribute.
The source code is under the MIT License.
FAQs
A JavaScript color parsing and manipulation library designed for convenience and flexibility (rather than runtime performance).
We found that sc-color 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.