UtilColorIsColorSimilar(Color, Color, Byte, Byte, Byte, Byte) Method
Determines whether two colors are similar.
It compares the ARGB channel differences to match inside the range of the specified tolerance threshold values.
Namespace: DevCase.Core.Media.GraphicsAssembly: 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 thresholdA,
byte thresholdR,
byte thresholdG,
byte thresholdB
)
Public Shared Function IsColorSimilar (
color1 As Color,
color2 As Color,
thresholdA As Byte,
thresholdR As Byte,
thresholdG As Byte,
thresholdB As Byte
) As Boolean
Dim color1 As Color
Dim color2 As Color
Dim thresholdA As Byte
Dim thresholdR As Byte
Dim thresholdG As Byte
Dim thresholdB As Byte
Dim returnValue As Boolean
returnValue = UtilColor.IsColorSimilar(color1,
color2, thresholdA, thresholdR, thresholdG,
thresholdB)
public:
static bool IsColorSimilar(
Color color1,
Color color2,
unsigned char thresholdA,
unsigned char thresholdR,
unsigned char thresholdG,
unsigned char thresholdB
)
static member IsColorSimilar :
color1 : Color *
color2 : Color *
thresholdA : byte *
thresholdR : byte *
thresholdG : byte *
thresholdB : byte -> bool
No code example is currently available or this language may not be supported.
- color1 Color
-
The first color to compare.
- color2 Color
-
The second color to compare.
- thresholdA Byte
-
The tolerance threshold of the Alpha color channel.
From 0 to 255.
- 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.
Boolean if the colors are similar,
this means the ARGB differences matches inside the range of the specified tolerance threshold value,
otherwise.
This is a code example.
No code example is currently available or this language may not be supported.
Dim areSimilar As Boolean = IsColorSimilar(Color.FromArgb(0, 0, 0), Color.FromArgb(0, 0, 1),
thresholdA:=255, thresholdR:=0, thresholdG:=0, thresholdB:=1)
' Result: True
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.