first funciton - xors defined for chapter 3 graphics exercise
drawing graphics and ensuring only valid colors are chosen