Added color function for generating canvas