Move mouse to color hex code (detection)

Hello,

I just purchased keyboard maestro and I was wondering how can I move my mouse to the color hex code I select? currently I believe it detects pictures but I would like to select a color code

can you please help me

thanks

don't know if that's possible natively using just KM, there are some solutions in StackOverflow

Here's a thread about a possible KM solution, using a predefined set of colors:

Thank you.

How would I use your stackoverflow solution? I didn't know you could write something in Python and use it

I just remembered that SVGs can be converted to PNGs, so, a possible KM "native" solution could be:

Copy Hex to clipboard

Then you activate a KM macro, which does the following:

  1. Inserts the hex #00000 code in a SVG

  2. The SVG is saved to a file

  3. In Terminal, Converts SVG to PNG using

    qlmanage -t -s 1000 -o ~ ~/test.svg

  4. It outputs a PNG image

  5. The macro reads the image

  6. Phew, finally, move the mouse to it

Yes, you can use Python and other languages as well!

Awesome I'll give that a try! :slight_smile:

I didn't realise you could use programming languages to create extended functionality with KM

If I wanted to make it more advanced for example if press the command button it will have a delay between 30 seconds to 2 minutes (randomised every time) then click #00000 with randomised x and y position? would that be possible

yes, just use a calculation inside the Pause, like this:

also try sharing your macro, what you have so far, and what app(s) do you need it for, so we can give a better advice.

1 Like

Thank you for the constant responses. I really appreciate it :slight_smile:

I don't have a macro currently. I am still trying to figure out how to use KM as I just purchased it.

I am trying to make a task easier in an idle game. It would be such a time saver if what I want is possible.

Do you think my requirements are too complex or is it definitely possible?