automatically assigns the colors to the arrays when gui window exits