Skip to content

[EuiColorStops] Allow stepped colors between stops #4570

@flash1293

Description

@flash1293

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions