I use the Keyboard Maestro Editor's ability to apply colors to actions quite liberally. I have certain colors set on favorite actions, but I also use colors while working on new macros—I'll put each routine into a large group, and color it red if it's non-functional, orange if it's working but needs changes, and green when it's done.
Applying colors in the editor, though, requires either a right-click to access the Set Color contextual menu, or using the Actions > Set Color menu item. Neither are conducive to quick and easy color setting. So I've got a small macro I've been using for years to make this easier, but a recent discussion here inspired me to clean it up and share it, in case others would also like faster access to colors while editing.
How it works
Invoke the macro with the hot key (it's set to Control-C as distributed), and a pop-up palette appears onscreen:
When the palette is onscreen, select one or more actions, then press the first letter of the color you want to apply—N for none, R for red, etc. You can leave the palette onscreen as long as you wish, but note that you cannot type the letters used in the palette while the palette is onscreen.
To dismiss the palette, press the Control key. If you try to apply a color without an action selected, the computer will speak an alert–I was using notifications, but they're basically not noticeable enough. Feel free to change that (in the "Set color subroutine" macro) if you wish.
If I want to just label something in a hurry, it's much quicker with the macro: Click on an action, press Control-C, type R or O or whatever, then press Control. No mouse movement required. And if I want to color a number of actions, I just leave the palette onscreen and press Control when done selecting and coloring.
———————————————
Macro details
__ ColorSetter Palette and Other Macros.kmmacros (412 KB)
The macro consists of two macro groups, both of which only work when the KM Editor is frontmost:
-
__ ColorSetter
: This macro group contains the macro that enables and disables the palette, as well as the subroutine macro that sets the chosen color (and speaks up if nothing is selected). -
__ ColorSetter Palette
: This macro group builds the color selection palette. Each color gets a preview icon, taken directly from Keyboard Maestro's color selector, so you can get a preview before applying a color. The colors are listed, along with a couple blank lines for readability, and a reminder that the Control key dismisses the palette.
ㅤ
Each macro in the palette is very simple: They call the color setting subroutine with the selected color as the parameter.
After downloading and installing the macro, enable the two macro groups, and change the hot key on the "Open color label palette" macro if you wish. And that's all there is to it.
ㅤ
———————————————
The rough version of this macro worked well, but I like the cleaned-up version even better (mainly I added in the preview icons and trapped on the color setting call so the macro handles things if nothing is selected). It's quite a basic macro, but it saves me a lot of mousing around.
-rob.