Jump to content

Does anyone know how shades variations works?


Recommended Posts

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.

Link to comment
Share on other sites

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
Link to comment
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?

Link to comment
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.
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...