HtmlStyleIsSameColor Method

Progress Software Corporation - Testing Framework 2018.1 Automation Infrastructure
Performs a simple color compare that only compares red/green/blue colors. Does not compare known color names or alpha blending.

Namespace:  ArtOfTest.WebAii.Controls.HtmlControls
Assembly:  ArtOfTest.WebAii (in ArtOfTest.WebAii.dll) Version: 2018.1.116.0 (2018.1.116.0)
Syntax

public static bool IsSameColor(
	Color colorA,
	Color colorB
)

Parameters

colorA
Type: System.DrawingColor
Color A to compare
colorB
Type: System.DrawingColor
Color B to compare

Return Value

Type: Boolean
True/False whether the two colors have identical RGB colors.
Remarks

Use this to compare colors instead of System.Color.Equals() to allow your compares to work across browsers. For example, IE returns colors as named colors (yellow, red ..etc) for computed styles where Mozilla always returns (rgb(x,y,z)). Using the HtmlStyle.ToColor and IsSameColor() can help abstract these differences and allow you to perform the compare across browsers.
See Also

Reference