Page 1 of 1

Creating a color palette from an specifc color

Posted: 2019-09-14T12:54:22-07:00
by pablobhz
Hello Everyone.
Is MagickNET able to create a color palette from an specific color ?

Ex: I have the following color:
231,49,0 (RGB).

I would like to create a color palette based on this color. And then replace pixels accordingly.
Ex: If the pixel is 0,0,0 , replace with the main color (pixel is totally black)
If the pixel is something like 80,80,80 replace with a lighter version (since the pixel has more white on it than the original black pixels)

And so goes on.

Does ImageMagick or MagickNet provide any mechanism of doing so (at least get RGB values) ?

I'm uploading an image to exemplify my question. It has been made with another tool, but serves as example to show what i'm trying to achieve.

Image

Thanks in advance

Re: Creating a color palette from an specifc color

Posted: 2019-09-14T13:44:57-07:00
by snibgo
"Palette" is a technical term, meaning that pixel numbers do not directly define colours. Instead, each pixel has a single number that is an index to a table (a "palette") of colours. IM does not supply tools to directly edit palettes.

But perhaps you simply want to change colours in an image, regardless of whether a palette is used. Yes, if your image has a range of colours, you can change that to a different range. See http://www.imagemagick.org/script/comma ... vel-colors

Re: Creating a color palette from an specifc color

Posted: 2019-09-14T14:57:37-07:00
by pablobhz
Based on what i've read, this does exactly the job.
I'll supply a main color (RGB Values). Based on the amount of black or white on the destination pixel, it will change the range of this main color.

Do you know if MagickNEt has something equivalent of that ?