iText 8.0.5 API
iText.Kernel.Colors.DeviceRgb Class Reference

Color space to specify colors according to RGB color model. More...

Inheritance diagram for iText.Kernel.Colors.DeviceRgb:
iText.Kernel.Colors.Color

Public Member Functions

  DeviceRgb (int r, int g, int b)
  Creates DeviceRgb color by intensities of red, green and blue colorants. More...
 
  DeviceRgb?????? (float r, float g, float b)
  Creates DeviceRgb color by intensities of red, green and blue colorants. More...
 
  DeviceRgb ()
  Creates DeviceRgb color with all colorants intensities initialised as zeroes. More...
 
  DeviceRgb (System.Drawing.Color color)
  Create DeviceRGB color from R, G, B values of System.Drawing.Color
Note, that alpha chanel is ignored, but opacity still can be achieved in some places by using 'setOpacity' method or 'TransparentColor' class. More...
 
- Public Member Functions inherited from iText.Kernel.Colors.Color
virtual int  GetNumberOfComponents ()
  Returns the number of color value components More...
 
virtual PdfColorSpace  GetColorSpace ()
  Returns the color space to which the color is related. More...
 
virtual float[]  GetColorValue ()
  Returns the color value of the color More...
 
virtual void  SetColorValue (float[] value)
  Sets the color value of the color More...
 
override int  GetHashCode ()
 
override bool  Equals (Object o)
  Indicates whether the color is equal to the given color. More...
 

Static Public Member Functions

static iText.Kernel.Colors.DeviceRgb  MakeLighter (iText.Kernel.Colors.DeviceRgb rgbColor)
  Returns DeviceRgb color which is lighter than given one More...
 
static iText.Kernel.Colors.DeviceRgb  MakeDarker (iText.Kernel.Colors.DeviceRgb rgbColor)
  Returns DeviceRgb color which is darker than given one More...
 
- Static Public Member Functions inherited from iText.Kernel.Colors.Color
static iText.Kernel.Colors.Color  MakeColor (PdfColorSpace colorSpace)
  Makes a Color of certain color space. More...
 
static iText.Kernel.Colors.Color  MakeColor (PdfColorSpace colorSpace, float[] colorValue)
  Makes a Color of certain color space and color value. More...
 
static DeviceRgb  ConvertCmykToRgb (DeviceCmyk cmykColor)
  Converts DeviceCmyk color to DeviceRgb color More...
 
static DeviceCmyk  ConvertRgbToCmyk (DeviceRgb rgbColor)
  Converts DeviceRgb color to DeviceCmyk color More...
 
static iText.Kernel.Colors.Color  CreateColorWithColorSpace (float[] colorValue)
  Creates a color object based on the passed through values. More...
 

Static Public Attributes

static readonly Color  BLACK = new iText.Kernel.Colors.DeviceRgb(0, 0, 0)
  Predefined black DeviceRgb color More...
 
static readonly Color  WHITE = new iText.Kernel.Colors.DeviceRgb(255, 255, 255)
  Predefined white DeviceRgb color More...
 
static readonly Color  RED = new iText.Kernel.Colors.DeviceRgb(255, 0, 0)
  Predefined red DeviceRgb color More...
 
static readonly Color  GREEN = new iText.Kernel.Colors.DeviceRgb(0, 255, 0)
  Predefined green DeviceRgb color More...
 
static readonly Color  BLUE = new iText.Kernel.Colors.DeviceRgb(0, 0, 255)
  Predefined blue DeviceRgb color More...
 

Additional Inherited Members

- Package Functions inherited from iText.Kernel.Colors.Color
  Color (PdfColorSpace colorSpace, float[] colorValue)
  Creates a Color of certain color space and color value. More...
 
- Package Attributes inherited from iText.Kernel.Colors.Color
PdfColorSpace  colorSpace
  The color space of the color More...
 
float[]  colorValue
  The color value of the color More...
 

Detailed Description

Color space to specify colors according to RGB color model.

Constructor & Destructor Documentation

◆ DeviceRgb() [1/3]

iText.Kernel.Colors.DeviceRgb.DeviceRgb ( int  r,
int  g,
int  b 
)
inline

Creates DeviceRgb color by intensities of red, green and blue colorants.

Creates DeviceRgb color by intensities of red, green and blue colorants. The intensities are considered to be in [0, 255] gap, if not, the intensity will be considered as 255 (when colorant's value is bigger than 255) or 0 (when colorant's value is less than 0).

Parameters
r the intensity of red colorant
g the intensity of green colorant
b the intensity of blue colorant

◆ DeviceRgb() [2/3]

iText.Kernel.Colors.DeviceRgb.DeviceRgb ( )
inline

Creates DeviceRgb color with all colorants intensities initialised as zeroes.

◆ DeviceRgb() [3/3]

iText.Kernel.Colors.DeviceRgb.DeviceRgb ( System.Drawing.Color  color )
inline

Create DeviceRGB color from R, G, B values of System.Drawing.Color
Note, that alpha chanel is ignored, but opacity still can be achieved in some places by using 'setOpacity' method or 'TransparentColor' class.

Parameters
color the color which RGB values are used

Member Function Documentation

◆ DeviceRgb??????()

iText.Kernel.Colors.DeviceRgb.DeviceRgb?????? ( float  r,
float  g,
float  b 
)
inline

Creates DeviceRgb color by intensities of red, green and blue colorants.

Creates DeviceRgb color by intensities of red, green and blue colorants. The intensities are considered to be in [0, 1] interval, if not, the intensity will be considered as 1 (when colorant's value is bigger than 1) or 0 (when colorant's value is less than 0).

Parameters
r the intensity of red colorant
g the intensity of green colorant
b the intensity of blue colorant

◆ MakeDarker()

static iText.Kernel.Colors.DeviceRgb iText.Kernel.Colors.DeviceRgb.MakeDarker ( iText.Kernel.Colors.DeviceRgb  rgbColor )
inlinestatic

Returns DeviceRgb color which is darker than given one

Parameters
rgbColor the DeviceRgb color to be made darker
Returns
darker color

◆ MakeLighter()

static iText.Kernel.Colors.DeviceRgb iText.Kernel.Colors.DeviceRgb.MakeLighter ( iText.Kernel.Colors.DeviceRgb  rgbColor )
inlinestatic

Returns DeviceRgb color which is lighter than given one

Parameters
rgbColor the DeviceRgb color to be made lighter
Returns
lighter color

Member Data Documentation

◆ BLACK

readonly Color iText.Kernel.Colors.DeviceRgb.BLACK = new iText.Kernel.Colors.DeviceRgb(0, 0, 0)
static

Predefined black DeviceRgb color

◆ BLUE

readonly Color iText.Kernel.Colors.DeviceRgb.BLUE = new iText.Kernel.Colors.DeviceRgb(0, 0, 255)
static

Predefined blue DeviceRgb color

◆ GREEN

readonly Color iText.Kernel.Colors.DeviceRgb.GREEN = new iText.Kernel.Colors.DeviceRgb(0, 255, 0)
static

Predefined green DeviceRgb color

◆ RED

readonly Color iText.Kernel.Colors.DeviceRgb.RED = new iText.Kernel.Colors.DeviceRgb(255, 0, 0)
static

Predefined red DeviceRgb color

◆ WHITE

readonly Color iText.Kernel.Colors.DeviceRgb.WHITE = new iText.Kernel.Colors.DeviceRgb(255, 255, 255)
static

Predefined white DeviceRgb color