PdfColor class Null safety

Implements structures and routines working with color.

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

Constructors

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. [...]

Properties

b int
Gets or sets Blue channel value. [...]
read / write
g int
Gets or sets Green channel value. [...]
read / write
hashCode int
The hash code for this object. [...]
read-only, override
isEmpty bool
Gets whether the PDFColor is Empty or not. [...]
read-only
r int
Gets or sets Red channel value. [...]
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
override

Static Properties

empty PdfColor
Gets the empty(null) color. [...]
read-only