ColorRamp constructor

ColorRamp({
  1. required PresetColorRampType type,
  2. required int size,
})

Creates a color ramp with a predefined color ramp type.

For the minimum number of steps, see PresetColorRampType.

Parameters:

  • type — The predefined color ramp type.
  • size — The number of steps in the complete resulting gradient. A typical value is 256.