Adding rectangle and color functions