How to make a colour clicker using AppleScript?
Consider using Sikuli to implement your task rather than AppleScript:


  Sikuli automates anything you see on the screen. It uses image recognition to identify and control GUI components. It is useful when there is no easy access to a GUI's internal or source code.