XColor SetRgb Function. Set the color to an RGB value. ABCpdf .NET PDF Library.

ABCpdf .net

 
   

Set the color to an RGB value.

 

   
Syntax  

[C#]
void SetRgb(int red, int green, int blue)
void SetRgb(int red, int green, int blue, int alpha)

[Visual Basic]
Sub SetRgb(red As Integer, green As Integer, blue As Integer)
Sub SetRgb(red As Integer, green As Integer, blue As Integer, alpha as Integer)

 

   

Params
 
Name Description
red The amount of red (0 to 255).
green The amount of green (0 to 255).
blue The amount of blue (0 to 255).
alpha The level of opacity from transparent through to fully opaque (0 to 255).

 

   

Notes
 

Set the color to RGB and provide a value for it.

Optionally set the alpha value to specify a transparency level. If this parameter is omitted the color is set to fully opaque - no transparency.

 

   

Example
 

None.