Skip to content

Check Color

ClicKey Pro

Check Color reads the color at a single screen coordinate and checks whether it matches a target color. Depending on the result it runs one of two branches (found / not found).

In the + Add Action menu, under Wait and Find, Check Color is the simplest screen-reading action – one pixel, one target color, one tolerance. It’s often the fastest and lightest way to wait for “a button turned green” or “the loading spinner is gone.”

Check Color can:

  • Check once whether a color is there – or not there.
  • Wait for a color to appear, or to disappear.
  • Click on the pixel, with Interact with Area.

Check Color needs Screen Recording permission. Without it the action fails immediately.

The editor has three sections: Where to look, What to find, and Check.

  1. Click + Add Action → Check Color.
  2. In Where to look, enter the X / Y coordinate – or click Sample and click the pixel on screen. Sample fills in the coordinate and the color of the clicked pixel in one step.
  3. In What to find, adjust the Color and the Tolerance if needed.
  4. In Check, pick a Mode – a single check (“Check once – if color is there” / “Check once – if color is not there”) or waiting (“Wait – until color is there” / “Wait – until color is gone”). For the two “Wait – …” modes, set Wait up to and Check every.
  5. Save. Then add actions to the branches.
OptionWhat it doesDefault
XHorizontal screen coordinate to read.0
YVertical screen coordinate to read.0
SampleOpens the macOS color sampler; clicking a pixel fills in X, Y, and the color.–
Color / HexThe target color, as a color picker plus an editable hex value.White
Tolerance (per channel)How close per channel a pixel must be to count as matching (0–255).10
ModeCheck once – if color is there / Check once – if color is not there or Wait – until color is there / Wait – until color is gone.Check once – if color is there
Wait up to (ms)How long to keep checking before giving up. Only shown for the two “Wait – …” modes.10000
Check every (ms)Time between checks. Only shown for the two “Wait – …” modes.500

For each color channel – red, green, and blue – ClicKey checks whether the pixel is within ±tolerance of the target. The pixel matches when all three channels are. A tolerance of:

  • 0–5 – a pretty exact match. Useful for flat, solid-color interfaces.
  • 5–30 – allows the small variations of anti-aliased edges.
  • 30+ – much more forgiving, useful when the target color sits in a gradient or behind a subtle overlay – but this can come with false positives!

At the maximum of 255 almost any color matches, so smaller values (like 5–30) are usually the way to go.

Every Check Color has two branches. Their names follow the Mode:

ModeFirst branchSecond branch
Check once – if color is there, Wait – until color is thereIf true (Color found)Else (Color not found)
Check once – if color is not thereIf true (Color is not there)Else (Color is there)
Wait – until color is goneIf true (Color is gone)Else (Color still present)

Expand the action in the macro list and add actions to either branch. In the “Wait – …” modes, the second branch runs when Wait up to runs out.

Every branch row shows a Special Actions menu with three actions that only exist inside a branch: Interact with Area…, Save Coordinates…, and Show Error Dialog…. The color check counts as a 1×1 area at its X/Y coordinate. Interact with Area and Save Coordinates act on that area, so they belong in the branch where the color is there.

  • Interact with Area moves the mouse to the pixel or clicks it, with an anchor and X/Y offsets. Show marks the point it will use; Show & click (or Show & move) also performs it.
  • Save Coordinates saves the X or Y of the pixel into a Number variable. Test shows the value that playback would save.
  • Show Error Dialog pauses the run and asks: Continue Macro runs the rest of the branch, Stop Macro ends the run, and Run branches again checks the color again and runs the branch that fits now. Its message names what the check found (“Color not found.” / “Color found.”, or “Color is still present.” / “Color is gone.” in the “…is not there” modes), and you can add your own text underneath. It can also answer itself after a timeout. More on this dialog: Find Image → Show Error Dialog.
  • Screen Recording permission is required. Without it the action fails immediately and the macro stops with a permission error.
  • One pixel is one pixel. If the target moves by even a few pixels between runs, the check may miss it. For more robustness, use Find Image or Find Text, or check several pixels with several Check Color actions.
  • The color itself can’t be saved. Save Coordinates saves the position, not the pixel’s color value.
  • X and Y expressions are evaluated when the action runs. If an expression can’t be evaluated as a Number, playback stops with an expression error.