This verson works using 5 colours and uses the sum of three cells in one row to decide the value in the next.
Right click on the image you like best, or see the Instructions...