SimilarColors

From SCAR Divi Manual
Revision as of 09:03, 28 June 2011 by Freddy (talk | contribs) (Created page with "==Definition== <source lang="scar" lines="false"> function SimilarColors(Col1, Col2, Tol: Integer): Boolean; </source> ==Availability== SCAR Divi 3.00 > Current ==Description=...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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