operator [] method

String operator [](
  1. num number
)

Return the interpolated color along the spectrum for domain item. If the number is outside the bounds of the domain, then the nearest edge color is returned.

Implementation

String operator [](num number) =>
    _includeOpacity ? _colourAt(number) : _stripOpacity(_colourAt(number));