If I have correctly understood question, then it easy:
that is on VBS:
'-------------------------------------------------
Dim objFSO 'As FileSystemObject
Dim objTextFile 'As Object
Set appRef = CreateObject("Illustrator.Application")
Set mydoc = appRef.ActiveDocument
myselection = mydoc.Selection
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.CreateTextFile("c:\color.txt", True)
For Each ch In myselection(0).Characters
Select Case mydoc.DocumentColorSpace
Case aiDocumentCMYKColor
c = Round(ch.CharacterAttributes.FillColor.Cyan, 2)
m = Round(ch.CharacterAttributes.FillColor.Magenta, 2)
y = Round(ch.CharacterAttributes.FillColor.Yellow, 2)
bk = Round(ch.CharacterAttributes.FillColor.Black, 2)
objTextFile.Write ("C=" & c & " : " & "M=" & m & " : " & "Y=" & y & " : " & "B=" & bk & chr(10) & chr (13))
Case aiDocumentRGBColor
r = Round(ch.CharacterAttributes.FillColor.Red, 2)
g = Round(ch.CharacterAttributes.FillColor.Green, 2)
be = Round(ch.CharacterAttributes.FillColor.Blue, 2)
objTextFile.Write ("R=" & r & " : " & "G=" & g & " : " & "B=" & be & chr(10) & chr (13))
End Select
Next
objTextFile.Close
'-------------------------------------------------------
script create txt file on C: and write a color of every character in selected frame