Change color of cells in a matrix