Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
image-palette
Advanced tools
Extract palette from pixels array, return pixels mapped to palette. Useful for organizing palette-based encoding, like GIF, or various limited colors renderers, like gl-scatter2d.
Inspired by get-rgba-palette.
var palette = require('image-palette')
var pixels = require('image-pixels')
var {ids, colors} = palette(await pixels('./image.png'))
var {ids, colors, amount} = palette(pixels, count=5)
Extract palette from the input pixels
array with rgba
pixels sequence, whether flat or nested.
colors
is a list of extracted colors [[r, g, b, a], [r, g, b, a], ...]
.ids
is an array of input pixels mapped to extracted colors
.amount
is an array with amounts corresponding to the extracted colors, from 0..1
range.count
is max number of colors to extract.© 2018 Dmitry Yv. MIT License.
FAQs
Get palette for any image file, no node-canvas
We found that image-palette demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.