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