The great EuiColorStops component allows two modes - fixed and gradient. For the use case of defining dynamic color palettes in Lens, we identified an additional use case: Stepped gradient between user defined stops.
The user would configure their stops and configure a number of steps, the resulting palette would use the defined stops as fixed points and interpolate between them, just like with the gradient type, but with a given number of stops instead of a smooth interpolation.
This is currently not possible to visualize using the EuiColorStops component.
API Suggestion
- Extend
stopType: 'gradient' | 'fixed' | 'stepped';
- New property:
stepNumber?: number (defaults to 10)
The great
EuiColorStopscomponent allows two modes -fixedandgradient. For the use case of defining dynamic color palettes in Lens, we identified an additional use case: Stepped gradient between user defined stops.The user would configure their stops and configure a number of steps, the resulting palette would use the defined stops as fixed points and interpolate between them, just like with the
gradienttype, but with a given number of stops instead of a smooth interpolation.This is currently not possible to visualize using the
EuiColorStopscomponent.API Suggestion
stopType: 'gradient' | 'fixed' | 'stepped';stepNumber?: number(defaults to 10)