How do I create a template image-based and PDF-based icons for MacOS?

人盡茶涼 提交于 2019-12-12 12:28:30

问题


Summary

I'd like to create a template image-based and/or PDF-based icon for a keyboard layout that would switch colors according to dark/light mode in MacOS Mojave when displayed in the menu bar.

Background

I've created a customized keyboard layout using Ukelele. I've based it on a native keyboard layout, allowing Ukelele to extract the icon from the original layout. I didn't touch the icon. Yet when I switch to dark mode, my layout's icon remains black, whereas in the original layout, it turns white.

I've done some research. According to Apple, for an icon to automatically adapt to dark/light mode, it sounds like it has to be a template image. (I guess Ukelele has somehow turned a template image-based icon into non template-based when extracting it from the original layout.)

I'm guessing a template image is a PNG image with only alpha channel and no color channels.

Upon further research, I've found out Apple is also referring to something called PDF-based icons. However, Apple doesn't give any details.

Questions

  1. Am I correct to guess that a template image is a PNG image with only alpha channel and no color channels?

  2. How do I create such an image? (I have access to Adobe CC, Affinity Photo and Designer, Pixelmator Pro and obviously all native MacOS apps.)

  3. What's a PDF-based icon, where do I find details on that, and how do I create it? Specifically, does iconutil support PDF-based icons?

Thanks!

来源:https://stackoverflow.com/questions/56084139/how-do-i-create-a-template-image-based-and-pdf-based-icons-for-macos

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!