The colors in that presentation are already Theme Colors (the standard Office Theme Colors)
To change eg the first Blue (accent1) to Red
Go to Design > Colors > Create New Theme Colors
Change Accent1 to Red and OK.
You don't need this but for educational purposes the code might be:
Code:
Sub switch_to_Theme()
Dim oshp As Shape
Dim osld As Slide
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
If oshp.Fill.ForeColor.RGB = RGB(255, 0, 0) Then
oshp.Fill.ForeColor.ObjectThemeColor = msoThemeColorAccent1
End If
Next oshp
Next osld
End Sub