ColorExtensionsTolerantEquals(Color64, Color64, UInt16, UInt16) Method
Gets whether two
Color64 instances are equal using a specified
tolerance.
Namespace: KGySoft.Drawing.ImagingAssembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 9.0.0
[CLSCompliantAttribute(false)]
public static bool TolerantEquals(
this Color64 c1,
Color64 c2,
ushort tolerance,
ushort alphaThreshold = 0
)
<ExtensionAttribute>
<CLSCompliantAttribute(false)>
Public Shared Function TolerantEquals (
c1 As Color64,
c2 As Color64,
tolerance As UShort,
Optional alphaThreshold As UShort = 0
) As Boolean
public:
[ExtensionAttribute]
[CLSCompliantAttribute(false)]
static bool TolerantEquals(
Color64 c1,
Color64 c2,
unsigned short tolerance,
unsigned short alphaThreshold = 0
)
[<ExtensionAttribute>]
[<CLSCompliantAttribute(false)>]
static member TolerantEquals :
c1 : Color64 *
c2 : Color64 *
tolerance : uint16 *
?alphaThreshold : uint16
(* Defaults:
let _alphaThreshold = defaultArg alphaThreshold 0
*)
-> bool
- c1 Color64
- The first color to compare.
- c2 Color64
- The second color to compare.
- tolerance UInt16
- The allowed tolerance for ARGB components.
- alphaThreshold UInt16 (Optional)
- Specifies a threshold under which colors are considered transparent. If both colors have lower A value than the threshold, then they are considered equal.
If only one of the specified colors has lower A value than the threshold, then the colors are considered different.
If both colors' A value are equal to or greater than this value, then tolerance is applied to the A value, too. This parameter is optional.
Default value: 0.
Boolean, if the colors are considered equal with the specified
tolerance; otherwise,
.In Visual Basic and C#, you can call this method as an instance method on any object of type
Color64. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).