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.
colorformat
Advanced tools
A simple JavaScript library to convert color format from RGB to HEX and vice versa
npm install colorformat
Convert an RGB to HEX:
cf = require('colorformat');
cf.rgbToHex(230, 241, 246); // => '#e6f1f6'
// or with string input
cf.rgbToHex('230', '241', '246'); // => '#e6f1f6'
Convert a HEX to RGB:
cf = require('colorformat');
cf.hexToRgb('#e6f1f6'); //=> [ 230, 241, 246 ]
// or if you want a string for styling
cf.hexToRgb('#e6f1f6', { styling: true }); //=> 'rgb(230, 241, 246)'
Load the script node_modules/colorformat/index.js
and then simply:
ColorFormat.rgbToHex(230, 241, 246); // => '#e6f1f6'
Note: Supports UMD for easier browser use with the tools of your preference.
FAQs
Convert color format from RGB to HEX and vice versa
The npm package colorformat receives a total of 0 weekly downloads. As such, colorformat popularity was classified as not popular.
We found that colorformat 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.
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.