Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
JavaScript module to manipulate colors, get its properties and compare it with another color following the WCAG 2.0.
Install
npm install --save colorizr
And import it:
import Colorizr from 'Colorizr';
const colorizr = new Colorizr('#ff0044');
colorizr.hex // #ff0044
colorizr.hsl // { h: 344, s: 100, l: 50 };
colorizr.rgb // { r: 255, g: 0, b: 68 };
colorizr.saturate(20);
colorizr.lighten(10);
Set the instance color.
colorizr.setColor(color: string | Array | Object)
colorizr.hue // 0-360
colorizr.saturation // 0-100
colorizr.lightness // 0-100
colorizr.red // 0-255
colorizr.green // 0-255
colorizr.blue // 0-255
colorizr.luminance // 0-1
colorizr.chroma // 0-1
Increase lightness.
colorizr.lighten(percentage: number = 10)
Decrease lightness.
colorizr.darken(percentage: number = 10)
Increase saturation.
colorizr.saturate(percentage: number = 10)
Decrease saturation.
colorizr.saturate(percentage: number = 10)
calculating-color-contrast
Colour Contrast Check
Contrast Checker
FAQs
Manipulate colors like a boss
The npm package colorizr receives a total of 413 weekly downloads. As such, colorizr popularity was classified as not popular.
We found that colorizr demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.