Color constructor

Color(
  1. int red,
  2. int green,
  3. int blue
)

Implementation

Color(this.red, this.green, this.blue) {
  if (red > 255 || green > 255 || blue > 255) {
    throw Exception("Invalid color value (>255)");
  }
}