Skip to content

Simplify color personalization #654

@guerinclement

Description

@guerinclement

Issue: Improve Color Palette Customization and Readability

Problem Description

Color palettes in Shapash are currently difficult to customize and understand. The mapping between dictionary keys and the actual HTML elements rendered in the web application is unclear, making personalization unintuitive and error-prone.

For example, in shapash/shapash/style/colors.json (lines 47–51, commit 5c99856):

"featureimp_bar": {
  "1": "rgba(0, 154, 203, 1)",
  "2": "rgba(223, 103, 0, 0.8)",
  "3": "rgba(240, 195, 162, 0.8)",
  "4": "rgba(245, 122, 0, 0.8)"
}

Using numeric keys such as "1", "2", "3" does not convey any semantic meaning, making it hard to determine which color corresponds to which UI element.

Proposed Solution

  1. Replace generic numeric keys with explicit, descriptive names wherever possible (e.g. primary, secondary, highlight, background, etc.) to clearly indicate their purpose.
  2. Add support for standard color scales (e.g. viridis, plasma, inferno, etc.) to allow easier and more flexible customization of color themes.

Expected Benefits

  • Improved readability and maintainability of color configuration files
  • Easier customization for users
  • Better alignment with common visualization practices

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions