PdfColor class

Implements structures and routines working with color.

//Creates a new PDF document.
PdfDocument document = PdfDocument()
      'Hello World!', PdfStandardFont(PdfFontFamily.helvetica, 12),
      //Using PDF color set pen.
      pen: PdfPen(PdfColor(200, 120, 80)));
//Saves the document.
List<int> bytes = await document.save();
//Dispose the document.


PdfColor(int red, int green, int blue, [int alpha = 255])
Initializes a new instance of the PdfColor class with Red, Green, Blue and Alpha channels.
PdfColor.fromCMYK(double cyan, double magenta, double yellow, double black)
Initializes a new instance of the PdfColor class with Cyan, Magenta, Yellow and Black channels.


b int
Gets or sets Blue channel value.
getter/setter pair
g int
Gets or sets Green channel value.
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
isEmpty bool
Gets whether the PDFColor is Empty or not.
no setter
r int
Gets or sets Red channel value.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited


noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
toString() String
A string representation of this object.


operator ==(Object other) bool
The equality operator.

Static Properties

empty PdfColor
Gets the empty(null) color.
no setter