Skip to main content
Participating Frequently
December 22, 2021
Answered

Add Keyboard Shortcut for the Foreground Color Picker

  • December 22, 2021
  • 2 replies
  • 5252 views

I’ve seen tutorials on how to add the Foreground Color Picker to the keyboard shortcuts available in Illustrator, but when I open the Keyboard Shortcuts (Mac using Command-option-shift-K) and look under tools, there is no option to assign a key to either the Foreground or Background Color Picker. It seems they used to be in the Keyboard Shortcut menu (around 2016 and 2017), but I’m not seeing them now. Is there another way to access those, other than double clicking on the squares in the tools panel? Or are they possibly called something else now, so I’m not seeing them?

 

Thanks in advance,

Tom Carlson

Correct answer Inventsable

You can prompt the color picker to open via scripting:

 

app.showColorPicker(
    app.activeDocument[
        "default" + (app.isFillActive() ? "Fill" : "Stroke") + "Color"
    ]
);

 

If you were to save the above as a text file with a name like "openColorPicker.jsx", you can place it in the Program Files for your startup scripts and record an Action with Insert Menu Item (searching for "openColorPicker") targeting this script which lets you trigger it via hotkeys assigned to the action like F12. Then I'd use macros from AutoHotKey, Keyboard Maestro, Sharpkeys or etc to remap some other key combination to send F12 and trigger the action.

2 replies

Doug A Roberts
Community Expert
Community Expert
December 22, 2021
quote

I’ve seen tutorials on how to add the Foreground Color Picker to the keyboard shortcuts available in Illustrator


By @TomMxEdit

 

Are you sure these weren't for Photoshop? Can you link to one?

TomMxEditAuthor
Participating Frequently
December 22, 2021

Thanks so much Doug and Ton. You are both correct and I will now wipe the egg off my face: That was a Photoshop tutorial I was watching -- I had done a search with "Illustrator" but what came up was a PS tutorial and I wasn’t paying close enough attention.

 

So, I would assume I can’t add the Color Picker as a keyboard shortcut then, is that correct? The reason I’d like to do this is to make the Color Picker more easily accessible to a keyboard macro program (Keyboard Maestro), which doesn’t seem to want to open it via a double-click. I’ll try playing with some of the parameters in KM and also try to open it as an action via Illustrator.

 

Thanks again for your help!

 

Tom

Inventsable
InventsableCorrect answer
Legend
December 23, 2021

You can prompt the color picker to open via scripting:

 

app.showColorPicker(
    app.activeDocument[
        "default" + (app.isFillActive() ? "Fill" : "Stroke") + "Color"
    ]
);

 

If you were to save the above as a text file with a name like "openColorPicker.jsx", you can place it in the Program Files for your startup scripts and record an Action with Insert Menu Item (searching for "openColorPicker") targeting this script which lets you trigger it via hotkeys assigned to the action like F12. Then I'd use macros from AutoHotKey, Keyboard Maestro, Sharpkeys or etc to remap some other key combination to send F12 and trigger the action.

Ton Frederiks
Community Expert
Community Expert
December 22, 2021

There is no foreground color in Illustrator, there is a Fill and Stroke color option.

Use X to switch between targeting Fill or Stroke color.

Use Shift X to switch the Fill and Stroke colors.