Returns true if str is a valid hex color (e.g. #FFF or #FFFFFF).
true
str
#FFF
#FFFFFF
bool isHexColor(String str) => hexColorReg.hasMatch(str);