Not much to go on but....
.......if your data is in a column, has no gaps between it and a spare column to the right then the code below should work for you
Sub Decode_sort_bycolour()
ActiveWorkbook.Names.Add Name:="Starter", RefersTo:=ActiveCell(1, 2)
Do
ActiveCell(1, 2).Value = ActiveCell.Interior.Color
ActiveCell(2, 1).Select
Loop Until ActiveCell.Value = ""
Range(ActiveCell(0, 1), "Starter").Select
Selection.Sort Key1:=Range("Starter"), Order1:=xlAscending, HEADER:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Selection.End(xlDown).Select
Selection.End(xlToRight).Select
Range(ActiveCell, "Starter").Clear
End Sub
You could change the "interior" bit above to "font" if you wanted to sort on that instead.
Also this will only sort the data in order of the number assigned to the colour of the cell / font.