Sign in to follow this  
MJW

Recolor Using Palette

Recommended Posts

This plugin is admittedly quite similar to TR's Custom Palette Matcher, but may be useful. It's in the Color menu.

 

The Plugin: Recolor Using Palette.zip

 

As the Help menu says:

 

Recolor Using Palette replaces each pixel color with the nearest color from a specified range of the current palette. The Euclidean distance is used. This minimizes the sum of the squared differences of the red, green, and blue color components.


The controls are:
Starting Palette Index: The number of the first palette color to use. Palette colors are numbered from 1 to 96.

Ending Palette Index: The number of the last palette color to use.

Ignore Opacity When Comparing Colors: When this option is enabled, only the red, green, and blue color components are compared; the alpha value is ignored. The original alpha is preserved in the replaced color. When this option is disabled, the image and palette colors are adjusted to account for their alpha values before being compared. The distance between colors is the distance between the colors when blended with the background color that maximizes the distance. The original alpha is replaced by the alpha of the nearest palette color.

Show Original Image: When enabled, the original, unmodified image is displayed.

 

The UI:

RecolorUsingPaletteUI_zps8htstz3h.png~or

 

 

Instead of managing palettes like TR's effect, it relies on PDN's built-in palette handling, which I think is fairly easy to use.  Recolor Using Palette allows a subrange of the current palette to be used. (Note the color-entry numbering is one-based, not zero-based.)

 

On interesting (which is not necessarily the same as useful) feature is that it can take opacity into account when doing the comparison. When opacity is used in the comparison, the entire palette color, including alpha, replaces the image color; otherwise, the image alpha is preserved, and only the red, green, and blue are replaced.

 

Here's a demonstration, using the default palette.

 

Original image:

RecolorUsingPaletteTestsImg_zps1prjitfb.

 

 

With Ignore Opacity When Comparing Colors enabled:

RecolorUsingPaletteTestsImgNoOpacity_zps

 

 

 

With Ignore Opacity When Comparing Colors disabled:

RecolorUsingPaletteTestsImgWithOpacity_z

 

(To be useful in this mode, the palette would likely need to be better suited to the image than it is in this case.)

 

Ignore Opacity When Comparing Colors is disabled by default.

  • Upvote 5

Share this post


Link to post
Share on other sites

Thanks!
Only had a quick try so far but looks good. Useful to be able to select only part of the current palette to use.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this