How to get color info of text in Text Layer?
How to get color info of text in Text Layer? I mean using Photoshop Scripting , Version of Photoshop is CS 8.0
How to get color info of text in Text Layer? I mean using Photoshop Scripting , Version of Photoshop is CS 8.0
I am sure there is a text layer named "标题"!
PS: a few days ago , I read the Photoshop cs2 VisualBasic Reference Guide, the TextItem object have a Color property, Read-Write. but when i test on computer, it says Color property only write can't read.
The textItem color is readable for me in VBS Note expects the activeLayer to be a textLayer and displays the HexValue of the text's color.
Option Explicit
Dim appRef
Dim docRef
Dim textItemRef
Dim artLayerRef
Dim textColor
Set appRef = CreateObject( "Photoshop.Application" )
appRef.BringToFront
Set docRef = appRef.ActiveDocument
Set artLayerRef = docRef.ActiveLayer
Set textItemRef = artLayerRef.TextItem
Set textColor = textItemRef.Color
MsgBox textColor.RGB.HexValue
And will return the color of the text if all the text is the same color. But if the text is more than one color textItem.color only returns the color of the first text range.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.