Adobe 23101764 Scripting Guide - Page 96
Dim solidColor As Photoshop.SolidColor
UPC - 718659340025
View all Adobe 23101764 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 96 highlights
Scripting Photoshop 3 Color objects SolidColor class Visual Basic and JavaScript have an additional class called the SolidColor class. This class contains a property for each color model. To use this object, first create an instance of a SolidColor object, then set its appropriate color model properties. Once a color model has been assigned to a SolidColor object, the SolidColor object cannot be reassigned to a different color model. Below are examples for creating a SolidColor object and set its CMYK property. VB: Dim solidColor As Photoshop.SolidColor Set solidColor = CreateObject("Photoshop.SolidColor") solidColor. CMYK.Cyan = 20 solidColor.CMYK.Magenta = 90 solidColor.CMYK.Yellow = 50 solidColor.CMYK.Black = 50 JS: var solidColor = new SolidColor(); solidColor.cmyk.cyan = 20; solidColor.cmyk.magenta = 90; solidColor.cmyk.yellow = 50; solidColor.cmyk.black = 50; Hex values An RGB color can also be represented as a hex value. The hexadecimal value is used to represent the three colors of the RGB model. The hexadecimal value contains three pairs of numbers which when read from left to right, represent the red, blue and green colors. In AppleScript, the hex value is represented by the hex value string property in class RGB hex color, and you use the convert color command described below to retrieve the hex value. In Visual Basic and JavaScript, the RGBColor object has a string property called HexValue/hexValue. Photoshop CS Scripting Guide 92