Partager via


ColorDifference Class

Represents the per-channel difference between two colors, used to represent tolerance.

Inheritance Hierarchy

Object
  Microsoft.VisualStudio.TestTools.UITesting.ColorDifference

Namespace:  Microsoft.VisualStudio.TestTools.UITesting
Assembly:  Microsoft.VisualStudio.TestTools.UITesting (in Microsoft.VisualStudio.TestTools.UITesting.dll)

Syntax

'Declaration
<CLSCompliantAttribute(True)> _
Public Class ColorDifference
[CLSCompliantAttribute(true)]
public class ColorDifference
[CLSCompliantAttribute(true)]
public ref class ColorDifference
[<CLSCompliantAttribute(true)>]
type ColorDifference =  class end
public class ColorDifference

The ColorDifference type exposes the following members.

Constructors

  Name Description
Public method ColorDifference() Initializes a new instance of the ColorDifference class, using values of zero, which indicates zero tolerance. Alpha is set to 255, which indicates maximum tolerance for transparency.
Public method ColorDifference(Byte) Initializes a new instance of the ColorDifference class, setting red, green, and blue to specified value. Alpha is set to 255, which indicates maximum tolerance for transparency.
Public method ColorDifference(Byte, Byte, Byte) Initializes a new instance of the ColorDifference class, using the specified red, green, and blue values. Alpha is set to 255, which indicates maximum tolerance for transparency.
Public method ColorDifference(Byte, Byte, Byte, Byte) Initializes a new instance of the ColorDifference class, using the specified alpha, red, green, and blue values.

Top

Properties

  Name Description
Public property Alpha Alpha (transparency) color channel difference.
Public property Blue Blue color channel difference.
Public property Green Green color channel difference.
Public property Red Red color channel difference.

Top

Methods

  Name Description
Public method Equals Compares the current object with another ColorDifference object. (Overrides Object.Equals(Object).)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Overrides object.GetHashCode. (Overrides Object.GetHashCode.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns the string representation of the ColorDifference. (Overrides Object.ToString.)

Top

Operators

  Name Description
Public operatorStatic member Equality Operator overload for == operator.
Public operatorStatic member Inequality Operator overload for the != operator.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.TestTools.UITesting Namespace