First give the background the colour white, then we can attack the first line. Choose two to three colours randomly between yellow, red, blue and black. Add white to the selection and stock the number 2 in a variable. Draw a square and fill it with a random colour chosen in the selection then replace 2 by either 0 or 1. Do it 38 more times to finish the line but this time if 0, fill the square with a different color that the one before, if 1, fill it with the same one. Then restart these steps with the following 38 lines.