Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
A lightweight javascript library for converting, parsing, and manipulating colors.
To include with Node, install via npm.
$ npm install --save colornary
To use in the browser, download the script and add the tag.
<script src="modules/colornary.js"></script>
const myRgbColor = toRgb('#fff');
// => `rgb(255, 255, 255)`
const myRgbaColor = toRgba('hsla(0, 0%, 100%, 0.5)');
// => `rgb(255, 255, 255, 0.5)`
const myHexColor = toHex('hsl(195, 100%, 50%)');
// => `#00bfff`
const myHslColor = toHsl('#ff00ff');
// => `hsl(300, 100%, 50%)`
const myHslaColor = toHsla('rgba(128, 0, 128, .75)');
// => `hsla(300,100%,25%,1)`
const myLighterColor = lighten('rgb(0, 0, 0)');
// => `rgb(26, 26, 26)`
const myDarkerColor = darken('rgb(255, 255, 255)', 0.5);
// => `rgb(128, 128, 128)`
const mySaturatedColor = saturate('rgb(13, 13, 13)');
// => `rgb(14, 11, 11)`
const myDesaturatedColor = desaturate('hsla(10, 10%, 0%, 1)');
// => `hsla(10, 0%, 0%)`
const myOpacifiedColor = opacify('rgba(255,255,255,0.5)', 0.2);
// => `rgba(255,255,255,0.7)`
const myTransparentizedColor = transparentize('rgba(255,255,255,0.5)', 0.2);
// => `'rgba(255,255,255,0.3)'`
Color - A color constitues a string or JSON representation of a color, where the color is of a supported type.
Factor - A factor constitues a floating point between 0 and 1 denoting a percentage. Factors default to 0.1 (or 10%).
Pull requests of any kind are welcome; whether it's adding a feature, improving documentation, or fixing a bug. However, there are some standard guidlines to follow when contributing code. Please read the following guide before opening a pull request
Guidelines for opening issuesFAQs
A javscript library for manipulating/converting colors.
We found that colornary 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.