Jump to content

PixelSearch to detect darkness/lightness?


Recommended Posts

Hello again!

My script is coming along great, but I've run into a problem with the PixelSearch function not detecting slight differences in color.

My impression is that the function detects differences in RGB value, but I'm really just looking for different shades of green.

Even at its highest shade-variation value (255) it fails to detect differences in the color green.

It is only shades of the color green I am wanting it to look for(and detect), but the green values vary greatly, such as:

0x52C550, 0x7DD56B, 0x3CBB0F, 0x6CDB96

(varying from dark green to very light green)

I could create many, many PixelSearch values but I am just wondering if there is a way achieve the same with a much simpler code.

I have seen threads about PixelSearch searching for brightness such as however I do not see how it is applicable to my needs.

Thank you all in advance!

-Vicate

Link to comment
Share on other sites

I know I said I'd respond within a day but I've been busy!

I tinkered with the ColorGetGreen, GetRed, and GetBlue functions and I have exactly what I was looking for!

Worked like a charm! Thanks a lot John!

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...