Liquid Glass icons appear differently in Dock

I just played around on macOS with the new icons created by Icon Composer, and I noticed that the Dock displays programmatically set icons differently. Try this:

  1. Make sure you have the Mail app in your Dock.
  2. Set the icon appearance to "Tinted/Light" and set a dark (black) background for the Desktop.
  3. Run this code:
let image = NSWorkspace.shared.icon(forFile: "/System/Applications/Mail.app")
        if image.isValid { NSApp.applicationIconImage = image }
  1. You'll get something like this:

When the icon appearance is set to "Default" or "Dark," everything works as expected, and the "Clear/Dark" and "Tinted/Dark" modes seem to work as well. It seems like the Dock uses a special blend mode depending on the selected background, but this does not seem to be the case if the icon is set programmatically. I filed feedback FB20291186.

Liquid Glass icons appear differently in Dock
 
 
Q