Sign in to follow this  
Followers 0
Vicate

PixelSearch to detect darkness/lightness?

5 posts in this topic

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

Share this post


Link to post
Share on other sites



Thanks again, John. I'll work with it when I get home.

I'll send a follow-up post tomorrow morning :huh2:

Thanks!

Share this post


Link to post
Share on other sites

The problem with the Shade Variation Is that work with all the components and not with only one. Look at the @FastFrench - Is more faster and you can add a list of colors for the pixelsearch function

Share this post


Link to post
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!

Share this post


Link to post
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
Sign in to follow this  
Followers 0