Colors are handled by a Color base class. Colors can be of the following types:

These colors can be used with many of the Page Element objects. RGB and Web colors can be used with the Outline and Bookmark Objects.

Examples for creating color objects:

[Visual Basic]
Dim MyCmykColor As CmykColor = New CmykColor( 0.5f, 0.3f, 0.6f, 0.0f )
Dim MyRgbColor As RgbColor = new RgbColor( 0.5f, 0.3f, 0.6f )
Dim MyWebColor1 As WebColor = new WebColor( "#FF0080" )
Dim MyWebColor2 As WebColor = new WebColor( "aqua" )
Dim MyGrayscale As Grayscale = new Grayscale( 0.3f )

[C#]
CmykColor cmykColor = new CmykColor( 0.5f, 0.3f, 0.6f, 0.0f );
RgbColor rgbColor = new RgbColor( 0.5f, 0.3f, 0.6f );
WebColor webColor1 = new WebColor( "#FF0080" );
WebColor webColor2 = new WebColor( "aqua" );
Grayscale grayscale = new Grayscale( 0.3f );

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 HtmlTextArea.

See Also

CmykColor Class | Color Class | Grayscale Class | RgbColor Class | WebColor Class | Programming With Generator for .NET | DynamicPDF.Generator Assembly