Node Jimp | Color hue Last Updated : 03 Apr, 2023 Comments Improve Suggest changes Like Article Like Report The hue modifier is an inbuilt color modifier in Nodejs | Jimp that applies hue to an image to a given amount, from -360 to 360. It is an alias of the spin modifier. Syntax: image.color([ { apply: 'hue', params: [value] } ]); Parameter: value - This parameter stores the amount of hue to apply. It takes values from -360 - 360. Input Images: Example 1: javascript // npm install --save jimp // import jimp library to the environment const Jimp = require('jimp'); // User-Defined Function to read the images async function main() { const image = await Jimp.read ('https://media.geeksforgeeks.org/wp-content/uploads/20190328185307/gfg28.png'); // color function having hue modifier image.color([{ apply: 'hue', params: [50] }]) .write('hue1.png'); } main(); console.log("Image Processing Completed"); Output: Example 2: cb (optional parameters) javascript // npm install --save jimp // import jimp library to the environment const Jimp = require('jimp'); // User-Defined Function to read the images async function main() { const image = await Jimp.read ('https://media.geeksforgeeks.org/wp-content/uploads/20190328185333/gfg111.png'); // color function having hue modifier image.color([{ apply: 'hue', params: [50] }], function (err) { if (err) throw err; }) .write('hue2.png'); } main(); console.log("Image Processing Completed"); Output: Reference: https://www.npmjs.com/package/jimp Comment More infoAdvertise with us Next Article Node Jimp | Color red S sarthak_ishu11 Follow Improve Article Tags : Web Technologies Node.js Image-Processing Node-Jimp Similar Reads Node Jimp | Color | green Introduction: The green modifier is an inbuilt color modifier in Nodejs | Jimp that modifies the green components of the given image by a given amount. Syntax: image.color([ { apply: 'green', params: value } ]); Parameter: value: This parameter stores the amount by which the green color of the imag 1 min read Node Jimp | Color darken The darken modifier is an inbuilt color modifier in Nodejs | Jimp which is used to darken an image up to a given amount, ranging between 0 to 100. At 100, the image will turn into a black image. Syntax:  image.color([ { apply: 'darken', params: [value] } ]); Parameter:  value - This parameter sto 2 min read Node Jimp | Color desaturate The desaturate modifier is an inbuilt color modifier in Nodejs | Jimp that desaturates an image to a given amount, from 0 to 100. If 100 amount is passed, it will result in a grayscale image. Syntax:  image.color([ { apply: 'desaturate', params: [value] } ]); Parameter:  value - This parameter st 1 min read Node Jimp | Color mix The mix modifier is an inbuilt color modifier in Nodejs | Jimp which mixes colors by their RGB component values and the amount is the opacity of the overlaying color. Syntax: image.color([ { apply: 'mix', params: [color : value] } ]); Parameter: color - This parameter stores the color to apply.valu 2 min read Node Jimp | Color red The red modifier is an inbuilt color modifier in Nodejs | Jimp which modifies the red components of the given image by a given amount. image.color([ { apply: 'red', params: value } ]); Parameter: value - This parameter stores the amount by which the red color of the image is to be modified. Input Im 1 min read Node Jimp | Color xor The xor modifier is an inbuilt color modifier in Nodejs | Jimp which treats the two colors as bitfields and applies an XOR operation to the red, green, and blue components of the given image. image.color([ { apply: 'xor', params: value } ]); Parameter: value - This parameter stores the color to whic 1 min read Like