ColorContrastExtension extension

Extension for easy contrast checking on colors.

on

Methods

adjustForContrast(Color background, {ContrastLevel level = ContrastLevel.aa}) Color

Available on Color, provided by the ColorContrastExtension extension

Adjusts this color to meet contrast requirements against a background.
contrastWith(Color other) double

Available on Color, provided by the ColorContrastExtension extension

Calculates the contrast ratio against another color.
hasContrastWith(Color other, {ContrastLevel level = ContrastLevel.aa}) bool

Available on Color, provided by the ColorContrastExtension extension

Checks if this color has sufficient contrast against another.