convertTo method

List<ColorModel> convertTo(
  1. ColorSpace colorSpace
)

Returns a new list containing the colors of this iterable converted to the defined colorSpace.

Implementation

List<ColorModel> convertTo(ColorSpace colorSpace) {
  return List<ColorModel>.from(this)
      .map<ColorModel>((color) => colorSpace.from(color))
      .toList();
}