I have been looking for this capability in Google Sheets for a very long time, and finally someone built it! Big thanks to Christopher Evans for this.
When data is color-coded and the only constant is the color of the cells or the fonts, sorting your data can be difficult. Now you can sort your color-coded spreadsheet based on the color of the cell or the color of the font. By reading the color of the cell or font, Sort By Color uses the hex code as sortable text.