Sign in to follow this  
Followers 0
Makaule

Does anyone know how shades variations works?

5 posts in this topic

Hello all, i have 1 question again. Does anyone know, how shades variations works? For example PixelSearch may look for color + shades variation, so its possible to get similar colors. I am planing to make Image colors checker using GDI+, but as i had noticed, it dont have shades variation function. Thanks in advance for all your answers.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

if it works identically to AHK then 0 means no variation at all from given color code (match must be exact color) and 255 marks all colors..

havent used this function yet in Autoit but its syntax looks identical

Edited by shaqan

Share this post


Link to post
Share on other sites

I am not sure,is my idea good or not, so i asked here. I think that its possible to add that "shade variation" to each of color, so i would get shaded color.

For Example:

I have RGB color [120] [193] [123];

I have shade 10;

So color which i need [120 +/- 10] [193 +/- 10] [123 +/- 10 ].

Am i wrong?

Share this post


Link to post
Share on other sites

I am not sure,is my idea good or not, so i asked here. I think that its possible to add that "shade variation" to each of color, so i would get shaded color.

For Example:

I have RGB color [120] [193] [123];

I have shade 10;

So color which i need [120 +/- 10] [193 +/- 10] [123 +/- 10 ].

Am i wrong?

That is how I understand "shade-variation" as described in the help. You will need to ensure that the resulting values for R,B and G are within 0 to 255 though.

$Bright = [newc($r + $shade)][newc($b + $shade)][$newc($g + $shade)]
$dull = ....
Func newc($val)
 if $val < 0 then return 0
 if $val > 255 then return 255
 return $val
EndFunc

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Ya, that's the same as i think. Seems that its working.

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