create method

P create({
  1. C? gray,
})

Creates a new pixel with the given channel values.

The gray value is optional.

If omitted, the channel value is set to the minimum value.

Example

// Creating a full gray pixel.
final pixel = grayscale.create(gray: 0xFF);

Implementation

P create({C? gray}) => copyWith(zero, gray: gray ?? minGray);