That depends on what you mean. Do you mean you want to change the part color in the part itself or in the context of an assembly? This sub will set the part color if the active document is a part, or the first occurrence's color if the active document is an assembly. It assumes that the "Gold" color style is not already in your document.
Sub PartColor()
Dim oAsset As Asset
Dim oLib As AssetLibrary: Set oLib = ThisApplication.AssetLibraries("Autodesk Appearance Library")
Set oAsset = oLib.AppearanceAssets("Gold")
If ThisApplication.ActiveDocumentType = kPartDocumentObject Then
Dim oPart As PartDocument: Set oPart = ThisApplication.ActiveDocument
oPart.ActiveAppearance = oAsset
ElseIf ThisApplication.ActiveDocumentType = kAssemblyDocumentObject Then
Dim oAsm As AssemblyDocument: Set oAsm = ThisApplication.ActiveDocument
Set oAsset = oAsset.CopyTo(oAsm)
Dim oOcc As ComponentOccurrence
Set oOcc = oAsm.ComponentDefinition.Occurrences(1)
oOcc.Appearance = oAsset
End If
End Sub