Equality.Equals

Extension Method in Equality

Declaration

public static bool Equals(this Color lhs, Color rhs, float rounding, bool compareAlpha = true)

Description

Determines if two colors are equal by comparing their component values after being rounded by a given amount.

Parameters

lhsThe first color to compare.
rhsThe second color to compare.
roundingThe amount to round the component values by.
compareAlphaWhether to compare the alpha values as well (default=true).

Returns

boolTrue if the colors are equal, false otherwise.