You probably got 486 by plugging values into the expression in the 2nd last part. However this gives the total number of ways under the assumption that not all colours have to be used.
To remove these cases, firstly note that it is impossible to use one colour to colour the grid, so we consider...