toColorModel method

ColorModel toColorModel()

If this is a ColorModel, return this, otherwise construct a new RgbColor from this Color.

Implementation

ColorModel toColorModel() =>
    this is ColorModel ? this as ColorModel : RgbColor.fromColor(this);