Jump to content

Get RGB Color


Recommended Posts

Is it possible to get the RGB color of a screen and then if the RGB color has certain hex digits that the mouse can click on that place? I'm asking it this way because the x and y coordinates are different on every monitor.

Link to comment
Share on other sites

$pixel = PixelSearch(3,3,610,400,0x5255CE)
MouseMove($pixel[0], $pixel[1], 0)
MouseClick("right", $pixel[0], $pixel[1], 2)

Change 0x5255CE to the hex RGB you want

To break down the hex version 0x defines the string of numbers as hex

52 is the first byte that represents red

55 represents green

CE represents blue.

0xFFFFFF Would be white.

Enjoy

Edited by Slaiochi
Link to comment
Share on other sites

$pixel = PixelSearch(3,3,610,400,0x5255CE)
MouseMove($pixel[0], $pixel[1], 0)
MouseClick("right", $pixel[0], $pixel[1], 2)

Change 0x5255CE to the hex RGB you want

To break down the hex version 0x defines the string of numbers as hex

52 is the first byte that represents red

55 represents green

CE represents blue.

0xFFFFFF Would be white.

Enjoy

Thx
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...