fromFloatRgba method

  1. @override
int fromFloatRgba(
  1. Float32x4 pixel
)
override

Converts a pixel in the floatRgba pixel format to this pixel format.

The method returns the closest color in the palette to the given pixel.

Implementation

@override
int fromFloatRgba(Float32x4 pixel) {
  return _findClosestIndex(_format.fromFloatRgba(pixel));
}