Copy link to clipboard
Copied
Hello!
Can I colored static text in UI?
I want to have red text in one staticText in UI. But I have no ideas, how to do this(
Code sample taken from page 89 of the Beginning ScriptUI guide by Peter Kahrel (255r 0g 0b):
// Font and colours for the second item, edittext
e.graphics.font = ScriptUI.newFont ("Letter Gothic Std", "Bold", 30);
e.graphics.foregroundColor = e.graphics.newPen (e.graphics.PenType.SOLID_COLOR, [1, 0, 0], 1);
Another example in this Bridge script from Paul Riggott:
https://github.com/Paul-Riggott/PS-Scripts/blob/master/Rename%20Replace.jsx
Copy link to clipboard
Copied
Code sample taken from page 89 of the Beginning ScriptUI guide by Peter Kahrel (255r 0g 0b):
// Font and colours for the second item, edittext
e.graphics.font = ScriptUI.newFont ("Letter Gothic Std", "Bold", 30);
e.graphics.foregroundColor = e.graphics.newPen (e.graphics.PenType.SOLID_COLOR, [1, 0, 0], 1);
Another example in this Bridge script from Paul Riggott:
https://github.com/Paul-Riggott/PS-Scripts/blob/master/Rename%20Replace.jsx
Copy link to clipboard
Copied
I recall a book on Indesign Scripting by Peter Kahrel which was pretty great for me.
Did he publish more general or even Photoshop-realted material, too?
Copy link to clipboard
Copied
Not that I am aware of, the guide that I was referring to was his general PDF that used many InDesign examples, however most of the guide was generally applicable to other apps.