Ok, the following function (formula) will sum the cells in a range that are the same colour as the cell you put the function in.
Function ColCount(wsRng As Range)
  
  Dim Cell As Range
    
  Application.Volatile
  
  wsCol = Application.Caller.Interior.ColorIndex
  
  For Each Cell In wsRng
    
    If Cell.Interior.ColorIndex = wsCol Then ColCount = ColCount + Cell.Value
    
  Next
End Function
-To use it, open the VBA window in the workbook you want to use this in.
-Right click the Workbook in the Project Explorer (the left hand window in the VBA editor) and Insert a module.
-Double click the module
-Paste the code above into the right hand bit of the window (as per screenshot below)
You can now use 
=ColCount(Your range) as a formula like you would SUM.
The function counts the cells in a range that are the same colour as the cell it is put in.
So if you want to sum Orange cells, write the formula in a cell and then colour that cell orange.