createColorFromHashCode function
Color equivalence of integer
Implementation
ColorPair createColorFromHashCode(int hashCode) {
List<int> hashCodeInts = computeNumbersList(hashCode);
List<int> computedRGBList = groupNumbersIntoRGB(hashCodeInts);
int r = computedRGBList[0];
int g = computedRGBList[1];
int b = computedRGBList[2];
return ColorPair(
main: Color.fromARGB(255, r, g, b),
surface: Color.fromARGB(255, r, g, b).computeLuminance() > 0.4
? Colors.black
: Colors.white);
}