Custom Palette

Thanks Bern!

One thing to note is that custom icons will store the image in your macro file, so it will use a much much larger amount of storage than the inbuilt icons (which just include a reference, and so are only a dozen bytes or so). If you have a large number of custom icons, that will potentially bloat the macro file, which is rewritten every time you make a change to your macros and a large size can eventually degrade performance.

Just something to keep in mind.

I'm unclear AND have questions.

Did you mean inbuilt ICONS?

Is there a way to include custom icons somewhere within KM so they can be referenced as well?

What constitutes a change to my macro(S)? Once A macro with A custom icon is made and it is used as is, does changing OTHER macros cause the custom iconed macros to be rewritten so anytime a new macro (with or without a custom icon) is made do all macros with custom icons get rewritten?

OR does "the" macro file in "bloat the macro file" mean everything in Keyboard Maestro is THE macro file and the entirety of Keyboard Maestro's footprint grows slowing down any use of a macro anywhere?

While maybe irrelevant, why does changes to macros with custom icons cause rewriting? How can I see the size to see the effect? Would it be worthwhile to delete and recreate macros periodically to reset their size? How much degrading are we talking about as probably 90% or more of my macros have custom icons and I have a lot of them?

Is there a better format (jpeg, png, gif) to have custom icons in?
What is the optimum document size for an icon? 200 px X 200 px? At what DPI?

Could (unused by me) inbuilt icons be appropriated and redesigned to avoid bloat?

Yes. Any icon selected from the Icon Chooser is stored in a handful of bytes.

No. Well, maybe you could create an app with the icon, but it would need a bundleid, so I don't know how you would do that easily.

Any change to your macros in the editor results in the entire Keyboard Maestro Macros.plist being written to disk (changes in quick succession are all written at the same time).

Yes. It wont appreciably affect Keyboard Maestro’s performance (as in the normal use of Keyboard Maestro macros). But it can degrade the editing performance if the macro file gets too large, which it can do if you start adding lots/large images to the macros, including as custom icons.

Any change in the editor results in the entire macro database file being written.

You can see the size of the Keyboard Maestro Macros.plist file in the Keyboard Maestro preferences folder, which you can open from the Help menu.


It depends on the Mac and especially the Mac’s harddisk. For an SSD, it probably don't matter as much since they are very fast.

If the file is a few MB, it is probably not an issue. If the file is a few hundred MBs, you are probably going to notice slowdowns in the editor.

They are all stored as compressed tiffs internally, so no.

No idea. Probably 64x64 is sufficient, maybe 128x128 for Retina. I don't really know.


1 Like

Thank you for clarifying all that :smiley:!

Hi All,
I can't seem to figure out how to accomplish the simplest of tasks: getting PNG icons into Icon Chooser!

My goal, is to replicate the pallet concept proposed by @DanThomas (here) and modified a little by
@Kourosh in his note-taking book for DEVONthink--where I learned about KBM.

If I copy a PNG that I want to become the pallet icon (i.e. from anywhere--Desktop or whatever), then select the icon I want to change in the KBM editor, ⌘V is unsuccessful---I get an Apple-produced image that suggests a PNG image should go there--but it doesn't render.

FWIW, the images are dinky little 125 dpi solid-color jobbydo's at 1KB.

The best solution is to get these into the Icon Chooser if anyone knows how. (Also, if I pick an icon from the icon chooser, I can get the icon to change--but the icons I want, aren't in there yet.)


Hi @Rayn_N , would that be a solution for you? I had created this for another user.


Awesome script! ..and thanks so much for showing me this!! It might come in super hand for me some day, but at the moment, all I really want to do is apply a heap of solid-color squares to various macros in a pallet. Isn't there a way to do this still? Thanks for your help!


1 Like

@appleianer I'm sorry, your video did explain the solution--THANK YOU for this. I've been going nuts tying to figure this out.

For others who find this in the future; open your new .png icon image in Preview. Copy the image from preview, then proceed as normal in the KBM editor--but be sure to remove whatever might be clogging the "image well" first, meaning; if you don't see the default image that was there in the KBM editor originally, then you need it to re-appear before you do this procedure by clicking the "dead" image link (produced by Apple with "PNG" printed on it) followed by Delete from your keyboard. That will restore the original (KBM) image, thereby clearing the "well," thereby allowing you to do a Command-V to insert your new icon.

It's a bit of a procedure, but it works!

Edit: you need-not remove the preexisting icon if there is one already there. Simply select the destination and Command-V to replace what is there, with your new icon. I have tested and can confirm this works fine.

1 Like

I'm not sure what issue you're having, but I can copy an image to the clipboard, single-click the macro icon in the editor, and paste the image in. Is that not working for you?

Hi Dan,
The sequence you describe is not working for me within the KM editor--but does work perfectly in DEVONthink and elsewhere, as it has in the past. However, there is a peculiar and inconvenient workaround that does work reliably in KM. This involves opening the desired icon-to-be in Preview and copying it to the clipboard from there. Then the target location can be single-clicked in the KM editor and pasted in just fine. Weird!

@peternlewis Any idea why @Ryan_N can't paste an image into the icon for a macro?

No idea why pasting the image isn't working.

I can copy an icon from a Finder Get Info window, and paste it in to the macro icon well, and then do another one over the top, and never have any problem.

My first guess would be it depends on where you get the image from.

1 Like

@DanThomas I was copying the image from Finder itself (think List View) by simply doing a Command-C atop the selected .PNG file. That’s probably where I ran amok, because I did not try the Command-I method from within the Get Info inspector.

Peter, you’ve built one hell of a fine product! I can already see my integration of KM becoming a rather addictive new obsession!!! (productivity aside, building automation itself is a hell of a lot of fun— and I don’t know a lick about code!)


Oh. I always open the image file in an image editor and copy the actual image. That way I can make sure to resize the image if it's too large. The reason I resize the image first is that KM saves the image in its original resolution, which can make the macro much larger. Well, at least it used to - it's possible Peter changed that behavior in KM, I'm not sure.

Yes he has, and yes, it's one of the most addictive things I've ever used. Especially since I'm a (retired) developer, and KM gives me all sorts of cool stuff to play with. :grinning_face_with_smiling_eyes:

Have fun!


If you copy in the Finder by selecting the file, you are really just getting a file reference to that file. It probably can work as an image, some of the time.

In my tests when I copied a .png file in the Finder it produced an image of the default .png file type.


It's even easier:

  1. Click the icon to open the Icon Chooser window, and
  2. Go to the last tab (Character), remove the icon, and select a background color:

Feb-24-2021 10-57-35

let us know if that solved it

1 Like

Palm to forehead! That's it! I have since accomplished the task via a much more involved method. For others wishing to add external icons; Peter offers this--which explains why I was running amok. TL;dr: copying a new icon from Finder's Info inspector (Command-I) works very reliably, wheres (what I was doing) copying the file itself from, say, a list-view in Finder works maybe if you're lucky.

1 Like

glad that helped.
Got to say it's not easily intuitive that you can click the icon area to change it.

1 Like


Thank you for the new option to put a custom menu of macros into the menu bar and for adding SF Symbols to the Icon Chooser. Both improve the experience of using KM by expanding how macros are accessed in action.

While you've fully opened the doors to having any palette design imaginable using the Custom HTML Prompt, in practice, for me, it's unlikely to be accessible as my desire to have palettes be what I'd like them to be isn't great enough to get over the mountain of learning HTML. And, from the lack of examples, I don't see anyone else taking on the challenge.

Therefore, I request you give some serious attention (for Version 11) to adding options to the existing Palette Theme Editor, such as radial Menus and other suggestions made within the forum.

One thing, in particular, that would be very helpful would be to allow text in addition to icons to be made and used in the Icon Chooser.

Thank you again for your indispensable addition to the Mac!

1 Like