The puzzle: The blocks can be any of C colors (C=2 by default). The grid is N blocks wide (N=4 by default). C and N can be controlled using the buttons at the top of the page. The puzzle is harder for larger N or C.
How to play: The blocks of the grid are randomly initialized when the page is loaded. When you click a block, all blocks in the same row and column will change color. The puzzle is solved when all blocks are the same color (see disclaimer below).
DISCLAIMER: For C=2 and N even, it is always possible to solve the puzzle. On the other hand, for C=2 and N odd, the puzzle is generally unsolvable for reasons that I will treat mathematically when I have time. I've also found that the puzzle can always be solved for C=3 when N=5 but NOT when N=4.