added a new function for the canvas and added a var for color pallette