replace-multiple-color
v1.0.0
Published
Replace multiple color with another one pixel by pixel.
Downloads
20
Maintainers
Readme
Replace Multiple Colors
this a fork of replace-color slightly changed to add multiple colors replacing functionality.
Install
npm install --save replace-multiple-color
Basic usage
const replaceColor = require('replace-color')
replaceColor({
image: './input.jpg',
colors: [{
type: 'hex',
targetColor: '#FF0000',
replaceColor: '#FFFFFF'
},
{
type: 'hex',
targetColor: '#FF0000',
replaceColor: '#FFFFFF'
}
], (err, jimpObject) => {
if (err) return console.log(err)
jimpObject.write('./output.jpg', (err) => {
if (err) return console.log(err)
})
})
see example folder.