PdfColor constructor

const PdfColor(
  1. double red,
  2. double green,
  3. double blue, [
  4. double alpha = 1.0,
])

Create a color with red, green, blue and alpha components values between 0 and 1

Implementation

const PdfColor(this.red, this.green, this.blue, [this.alpha = 1.0])
    : assert(red >= 0 && red <= 1),
      assert(green >= 0 && green <= 1),
      assert(blue >= 0 && blue <= 1),
      assert(alpha >= 0 && alpha <= 1);