textColorByLuminance static method
Implementation
static Color textColorByLuminance(
final Color color, {
final Color darkColor = Colors.black,
final Color lightColor = Colors.white,
final double threshold = 0.183,
}) => color.computeLuminance() > threshold ? darkColor : lightColor;