rgb static method

String rgb(
  1. int r,
  2. int g,
  3. int b
)

Implementation

static String rgb(int r, int g, int b) {
  if (r < -100 || r > 100) {
    throw ArgumentError('Red value must be between -100 and 100, inclusive.');
  }
  if (g < -100 || g > 100) {
    throw ArgumentError(
      'Green value must be between -100 and 100, inclusive.',
    );
  }
  if (b < -100 || b > 100) {
    throw ArgumentError(
      'Blue value must be between -100 and 100, inclusive.',
    );
  }
  return '$_filterRGB($r,$g,$b)';
}