Darkmode graphics

I have a set of preloaded graphics (pngs) that are used in my program that naturally don’t change appearance in Darkmode.
Short of creating another 12 that are more sympathetic to Darkmode and adding them to the resources are there any graphic or filter type tricks I could employ?

If you find one, let me know :slight_smile:
since the advent of “darkmode” many of my apps have FOUR(4) versions of each required image…
@1x lite, @2x lite, @1x dark and @2x dark

but I have begun not including the @1x, since most machines are now Retina, and those without still get a decent image shown.

Without seeing the graphics, it’s hard to recommend. The general advice is to take the mask from the graphic and use it to mask the foreground color, making a monotone image. Apple calls this a template.

Designing icons with the intention of using them as templates is the best advice though, since you can recolor them as necessary.

Which is done ALOT with iOS (tab/toolbars for example). However, there are still some instances where a monochrome icon doesn’t fit the application need.

Note : quite a while back I posted a IconResizer, and one of the things it did was take a “colored” icon and make a multi-shaded template icon, and it actually did a very good job of it :slight_smile:

[quote=473188:@Martin Fitzgibbons]I have a set of preloaded graphics (pngs) that are used in my program that naturally don’t change appearance in Darkmode.
Short of creating another 12 that are more sympathetic to Darkmode and adding them to the resources are there any graphic or filter type tricks I could employ?[/quote]
If you’re targeting macOS, yes there is. You can use declares to convert grey scale images to “template” images, then use declares to set these images into controls and they’ll be displayed in the correct theme color.

inpicture.copyOSHandle( picture.handleType.MacNSImage )

will get you an NSImage.

Declare Sub NSImageTemplate lib "AppKit" selector "setTemplate:" (NSImageInstance as ptr, assigns value as boolean)

will allow you to set the template attribute.

Declare Sub NSControlImage lib "AppKit" selector "setImage:" (NSControlInstance as integer, assigns inNSImage as ptr)

will allow you to set the image on a few controls, listbox is not possible, popupmenu requires different code.

A greyscale app has all the lack of charm of the eastern block cities in the 80s and not the beauty of an Ansel Adams photo.

I had to modernise my app anyways and made graphics for Light and Dark Mode. Light Mode has a couple of gradients and Dark Mode has different gradients. Having to do 4 icons sucked lemons but it looks much better than before.

[quote=473206:@Beatrix Willius]A greyscale app has all the lack of charm of the eastern block cities in the 80s and not the beauty of an Ansel Adams photo.

I had to modernise my app anyways and made graphics for Light and Dark Mode. Light Mode has a couple of gradients and Dark Mode has different gradients. Having to do 4 icons sucked lemons but it looks much better than before.

[/quote]
Sure, but the question was about avoiding doing exactly that. That leaves few options.

There is no shortcut to get good graphics.

One problem of including extra Darkmode graphics is that they are exported to your Windows version but not used??