shade method

Color shade(
  1. int number
)

Takes an integer as argument and returns a color shade based on that number. If no shade with the given number exists, it returns the color itself.

number - The number representing the shade of the color. Returns a color object that represents a specified shade or the color itself.

Implementation

Color shade(int number) => this[number]!;