Skip to content

Show "Invert colormap" param directly in the Colormap Selection Widget #296

@ThomasMalletCodra

Description

@ThomasMalletCodra

Describe the bug

When the "Invert colormap" option is enabled in DataLab's settings, applying a new colormap from the colormap manager produces a visually inverted result compared to the colormap preview shown in the menu. This behavior is technically correct (the global inversion setting is applied on top of the selected palette), but it is confusing and has already led users to report it as a bug.

Example scenario:

  1. The user selects the "Jet" colormap from the palette menu, where the preview shows blue (low values) → red (high values)
  2. After applying, the image displays the opposite mapping: blue corresponds to the highest values
  3. Re-opening the palette selection confirms the palette is shown inverted — consistent with the display, but inconsistent with the initial preview

The root cause is that the "Invert colormap" setting is hidden in the global preferences and is not visible or indicated anywhere in the colormap manager. Users have no way to know that inversion is active when choosing a colormap.

Expected behavior

The colormap manager should clearly indicate when the "Invert colormap" option is active, so users immediately understand why the applied colormap appears reversed compared to the preview.

Proposed solution

Add a visible checkbox (or toggle indicator) labeled "Invert colormap" directly in the colormap manager. This checkbox should:

  • Reflect the current state of the global "Invert colormap" setting from preferences
  • Allow the user to toggle inversion directly from the colormap manager without navigating to the global settings
  • Update the palette preview in real-time when toggled, so the preview always matches the final rendering

This would make the inversion state discoverable at the point of use, eliminating confusion.

Screenshots

Image Image Image Image

Installation information

  • Reported by external user
  • Observed on standard DataLab installation

Additional context

  • Affected component: PlotPy / DataLab colormap manager and settings integration
  • Impact: Users mistakenly believe colormaps are being applied incorrectly, leading to false bug reports and loss of confidence in the tool
  • UX principle: Settings that affect visual output should be visible and controllable at the point where the user makes their choice, not hidden in a separate preferences dialog

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions