set method

  1. @override
void set(
  1. Color c
)
override

The the values of this color to the given color.

Implementation

@override
void set(Color c) {
  if (image.hasPalette) {
    index = c.index;
  } else {
    r = c.r;
    g = c.g;
    b = c.b;
    a = c.a;
  }
}