UtilColorIsColorSimilar(Color, Color, Byte) Method

Determines whether two colors are similar.

It compares the RGB channel difference to match inside the range of the specified tolerance threshold value.

Definition

Namespace: DevCase.Core.Media.Graphics
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static bool IsColorSimilar(
	Color color1,
	Color color2,
	byte threshold
)

Parameters

color1  Color
The first color to compare.
color2  Color
The second color to compare.
threshold  Byte
The global tolerance threshold of the RGB color channels. From 0 to 255.

Return Value

Boolean
if the colors are similar, this means the RGB differences matches inside the range of the specified tolerance threshold value, otherwise.

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

See Also