Created
June 8, 2020 15:09
-
-
Save Lokno/5aa37d966e5a6022be15cd6d27bcecfb to your computer and use it in GitHub Desktop.
Sets the gray scale color of each text item in a group of a given name to a smooth gradient
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var layerSetText = app.activeDocument.layerSets.getByName("GROUPNAME") | |
| for (var i=0; i<layerSetText.artLayers.length; i++) { | |
| var col = new SolidColor(); | |
| var grayCol = new GrayColor(); | |
| grayCol.gray = i*100.0/(layerSetText.artLayers.length-1); | |
| col.gray = grayCol; | |
| layerSetText.artLayers[i].textItem.color = col; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment