Inspired by the four colours puzzle.
The goal is to color the squares of an $n\times n$ grid with $n$ colors such that
All squares are coloured.
no two squares of the same color touch at an edge or corner
there are an equal number of squares of each color.
For which values of $n$ is this possible?