What is the minimum number of colors required to paint all the cells of a 6 by 6 square grid such that each row, column, and diagonal of the square has all cells with different colors? Note: A diagonal of the square is defined as all rows of at least two cells going diagonally from one edge of the square to the other at an angle of or to the horizontal.