chooseFontColorFromColor function
Implementation
Color chooseFontColorFromColor(Color color, {int divide = 1}) {
if (color.computeLuminance() > 0.6) {
switch (divide) {
case 1:
return Grey.grey_7;
case 2:
return Grey.grey_6;
case 3:
return Grey.grey_5;
}
return Grey.grey_4;
}
switch (divide) {
case 1:
return Grey.grey_1;
case 2:
return Grey.grey_2;
case 3:
return Grey.grey_3;
}
return Grey.grey_4;
}