Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
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
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.