UtilColorIsColorSimilar(Color, Color, Byte, Byte, Byte) Method

Determines whether two colors are similar.

It compares the RGB channel differences to match inside the range of the specified tolerance threshold values.

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 thresholdR,
	byte thresholdG,
	byte thresholdB
)

Parameters

color1  Color
The first color to compare.
color2  Color
The second color to compare.
thresholdR  Byte
The tolerance threshold of the Red color channel. From 0 to 255.
thresholdG  Byte
The tolerance threshold of the Green color channel. From 0 to 255.
thresholdB  Byte
The tolerance threshold of the Blue color channel. 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