Accessibility.IsCompliant

Extension Method in Accessibility

Declaration

public static bool IsCompliant(this Accessibility.Requirement requirement, Color foreground, Color background)

Description

Determines if the contrast between a foreground color and a background color is compliant to the accessibility requirement.

Parameters

requirementThe requirement to check.
foregroundThe foreground color.
backgroundThe background color.

Returns

boolTrue if the contrast is compliant, false otherwise.

Overload

Declaration

public static bool IsCompliant(this Color foreground, Color background, Accessibility.Requirement requirement)

Description

Determines if the contrast between the foreground color and a background color is compliant to a given accessibility requirement.

Parameters

foregroundThe foreground color.
backgroundThe background color.
requirementThe requirement to check.

Returns

boolTrue if the contrast is compliant, false otherwise.