function according to the color fill in a cell