MacOS – Script OSX Color Picker to choose a specific color and exit

applescriptcolormacos

Looking for a way to AppleScript the native (?) OSX Color Picker displayed in Evernote so that I can set a specific color and exit.

Use case: Would like to create scripts to mark selected text red, green, and black. I will use Automator or tool like Fastscripts or Keyboard Maestro to trigger these scripts via hotkeys. My goal is to quickly re-color selected text without having to use the mouse.

Best Answer

You can use Keyboard Maestro's mouse actions to find an image on the screen (such as the colour wheel), then a defined pixel coordinate within the found image to click on. This will therefore select the same colour regardless of where the window is located.