- CMYK - Specified with C, M, Y, and K color values
- RGB - Specified with R, G, and B color values
- Web - Specified with the Web color format (i.e. "FF0080" or "aqua")
- Grayscale - Specified as a level of gray
- Gradient - Specified with two color of the same type
CMYK Color
[ASP - VBScript]
Set CmykLabel = MyPage.AddLabel( "Hello World using CMYK color!", 10, 30, 70, 20 )
CmykLabel.TextColor = MyDocument.Colors.GetCmykColor( 1.0, 0.3, 0.4, 0.3 )
RGB Color
[ASP - VBScript]
Set RgbLabel = MyPage.AddLabel( "Hello World using RGB color!", 10, 50, 70, 20 )
RgbLabel.TextColor = MyDocument.Colors.GetRgbColor( 0.5, 0.3, 0.6 )
Web Color
[ASP - VBScript]
Set WebLabel = MyPage.AddLabel( "Hello World using Web color!", 10, 70, 70, 20 )
WebLabel.TextColor = MyDocument.Colors.GetWebColor("FF0080")
Grayscale
[ASP - VBScript]
Set GrayscaleLabel = MyPage.AddLabel( "Hello World using Grayscale!", 10, 90, 70, 20 )
GrayscaleLabel.TextColor = MyDocument.Colors.GetGrayscale( 0.3 )
Gradient
[ASP - VBScript]
Set RgbRectangle = MyPage.AddRectangle( 0, 0, 300, 300 )
RgbRectangle.FillColor = MyDocument.Colors.GetGradient( 0, 0, 200, 200, MyDocument.Colors.GetRgbColor( 0.1, 0.3, 0.1 ), MyDocument.Colors.GetRgbColor( 0.2, 0.8, 0.1 )
Spot Color
[ASP - VBScript]
Dim SpotLabel
Set SpotLabel = MyPage.AddLabel( "Hello World using Spot Color!", 10, 130, 70, 20 )
SpotLabel.TextColor = MyDocument.Colors.GetSpotColor( 1, MyDocument.Colors.GetSpotColorInk( "My Red", MyDocument.Colors.GetCmykColor( 0.2, 0.9, 0.5, 0.2 ) ) )
Predefined Colors
The color class includes over 140 predefined colors accessed through static property of the Color class by color name. These names correspond with the colors commonly used in web development. These can also be specified by name in the constructor of the WebColor class or from within an FormattedTextArea.
Backward Compatibility
Color can also be specified using the string value. This is for backward compatibility.
| See Also |
Programming with Generator for COM/ActiveX

