• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to find out the textframe color information?

Community Beginner ,
Mar 09, 2009 Mar 09, 2009

Copy link to clipboard

Copied

Is it possible to get all the TextFrame color information(like CMYK,RGB values) in illustrator through javascript (or) through any other programming language? Kindly advice me.
TOPICS
Scripting

Views

1.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Beginner ,
Mar 14, 2009 Mar 14, 2009

Copy link to clipboard

Copied

Any one please.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 14, 2009 Mar 14, 2009

Copy link to clipboard

Copied

Yes.

Maybe you should RTFM before posting these 'I can't be bothered to read the documentation, so please do my thinking for me' type posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 16, 2009 Mar 16, 2009

Copy link to clipboard

Copied

Thanks for your response. I searched in ScriptingGuide. But i could not find out the correct answer. So could you please provide an example to get the textframe color values. Kindly help me.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 16, 2009 Mar 16, 2009

Copy link to clipboard

Copied

It's an attribute of a character so figure out how to set that.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Mar 16, 2009 Mar 16, 2009

Copy link to clipboard

Copied

If you're trying to get the fill of the Frame itself (not the text), then I believe you need to get the textPath of your textFrame, and you should be able to access the fillColor of the textPath. (note - you will have to check the 'kind' property of your textFrame to determine if it has a textPath)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 17, 2009 Mar 17, 2009

Copy link to clipboard

Copied

Thanks for your response. I need to find out text color information like "Cyan" "Magenta" "Yellow" and "Black" percentage. I got the PathItem color information. But i am unable to get the text color information. Could you please help me.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 17, 2009 Mar 17, 2009

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 18, 2009 Mar 18, 2009

Copy link to clipboard

Copied

Thanks for your help. Thats only i need. But i could not find out the spot color information from that code. Kindly help me to get the spot color information(Just spot color found or not is enough in the CharacterAttributes).

And also is it possible to find out the text object information like PATTERN, GRADIENT and BRUSHED objects.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 19, 2009 Mar 19, 2009

Copy link to clipboard

Copied

LATEST
Anyone please help me.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines