transformToLightColor static method
Implementation
static Color transformToLightColor(Color color) {
// Round to nearest: round((v + 255) / 2) == (v + 256) >> 1
int mixToWhite(int v) => ((v + 256) >> 1);
final int r = mixToWhite(color.red);
final int g = mixToWhite(color.green);
final int b = mixToWhite(color.blue);
return Color.fromARGB(color.alpha, r, g, b);
}