Changing Colours in an NSImage


Dave
 

Hi,

I have an Image that has a transparent background, the foreground image is made up totally of the (NSColor blackColor), is this an easy way to replace the “blackColor” with another Color? As an example:

I have a Letter “A” in a 128 x 128 image, the “A” is Black and the background is transparent, I want to change the Colour (in the same way as you would change the colour by changing a Text Attribute).

Thanks for any insights!

All the Best
Dave


Alex Zavatone
 

Check out the tint.

On Sep 29, 2018, at 7:59 AM, Dave <dave@looktowindward.com> wrote:

Hi,

I have an Image that has a transparent background, the foreground image is made up totally of the (NSColor blackColor), is this an easy way to replace the “blackColor” with another Color? As an example:

I have a Letter “A” in a 128 x 128 image, the “A” is Black and the background is transparent, I want to change the Colour (in the same way as you would change the colour by changing a Text Attribute).

Thanks for any insights!

All the Best
Dave