? Would it be possible to factor out all the //Adding color parts by making a helper function named something like addColor(mode, color,opaqueness)