VOOZH about

URL: https://www.geeksforgeeks.org/node-js/node-js-gm-recolor-function/

⇱ Node.js GM recolor() Function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Node.js GM recolor() Function

Last Updated : 28 Apr, 2025

The recolor() function is an inbuilt function in the GraphicsMagick library which is used to apply a color translation matrix to the image channels. The function returns the true value of success. 

Syntax:

recolor( matrix )

Parameters: This function accepts a single parameter as mentioned above and described below:

  • Matrix: This parameter is used to specify the value as a string of a matrix which is decoded as a color transformation matrix.

Return Value: This function returns the GraphicsMagick object. 

Example 1: 

Output:

 👁 Image
 

Example 2: 

Output:

 👁 Image
 

Reference:

Comment

Explore