Difference between revisions of "SimilarColors"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> function SimilarColors(Col1, Col2, Tol: Integer): Boolean; </source> ==Availability== SCAR Divi 3.00 > Current ==Description=...") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
==Description== | ==Description== | ||
− | This function returns [[true]] if 2 given colors specified by '''Col1''' and '''Col2''' are within the tolerance range of each other specified by '''Tol'''. This is determined using the active tolerance algorithm which can be changed with [[ColorToleranceSpeed]]. | + | This function returns [[true]] if 2 given colors specified by '''Col1''' and '''Col2''' are within the [[tolerance]] range of each other specified by '''Tol'''. This is determined using the active tolerance algorithm which can be changed with [[ColorToleranceSpeed]]. |
==Example== | ==Example== | ||
Line 21: | Line 21: | ||
1 | 1 | ||
0 | 0 | ||
+ | |||
+ | ==See Also== | ||
+ | *[[GetTolerance]] | ||
+ | *[[GetClosestColor]] | ||
+ | *[[SimilarBitmaps]] | ||
+ | *[[SimilarBitmapsEx]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
[[Category:Color Functions]] | [[Category:Color Functions]] | ||
[[Category:Tolerance Functions]] | [[Category:Tolerance Functions]] |
Latest revision as of 00:46, 17 December 2011
Definition
function SimilarColors(Col1, Col2, Tol: Integer): Boolean;
Availability
SCAR Divi 3.00 > Current
Description
This function returns true if 2 given colors specified by Col1 and Col2 are within the tolerance range of each other specified by Tol. This is determined using the active tolerance algorithm which can be changed with ColorToleranceSpeed.
Example
begin WriteLn(SimilarColors(125, 126, 1)); WriteLn(SimilarColors(125, 127, 1)); end.
Output:
1 0