Generating a mask png from a color image? Apple requires certain icons to be monochrome masks with transparency in png  file format.

How (on macOS, using a built-in app, such as Preview, or an app in the App store, such as Pixelmator) can I convert an existing color image (png file), so that one color (a background) becomes transparency, and everything else becomes either pure black or pure white?

Is it then possible to invert a mask? (transparency becomes black or white, and any non-transparent areas becomes transparent)
You can do this in Photoshop, &amp; I would imagine Pixelmator or any other decent graphics package could in a similar manner…
Invert Colour can also be done in Gimp - freeware, open source. If you want to use Gimp, then I'd recommend this Mac-specific build from https://www.partha.com/ which looks &amp; feels far more 'Mac-like' than the official build.
Load your image, use the Magic Wand or equivalent to select the background.

Layer Menu &gt; Layer Mask &gt; Hide selection

You've now generated the basic mask shape.
The next bit is a bit fiddly, but you can automate it for future use.
Opt/click this new mask, then select all. Copy, click the picture item in the Layer, Paste. This will generate a new layer containing the black &amp; white image of your mask.

Drag your original mask to the new layer (both thumbnails will then look the same.)
Disable your original layer to save confusion.
Click the main image in the thumbnail &amp; Invert (Cmd/i)
That's your first mask. Save as png.
PNG with transparency is a 32-bit file rather than 24. Some apps differentiate this way, others including Photoshop have a dedicated &quot;save Transparency&quot; option which changes the bit depth for you.

Undo the Invert (or Invert again) then Opt/click the Mask &amp; Invert.
That's your 2nd mask. Again save as png.

You could, of course, do each of these as a new layer, then saving your file as PSD or other native format would preserve all assets in a single file.