Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.