Sorting the cells by color begins with having a text like this:
1. Click Data (1), and then click on sort (2).
Note: You should first press the AZ beside the small picture showing ZA/AZ, so it makes easier to move ahead.
2. Choose the column (1), then choose color in sort by (2), and then order (3).
Note: After following this step, press Add level, sorting by the same thing in column, cell color, and choose color you'd like to have on the second place. Continue until you'd add all the colors in the data, and then press ok.