Skip to content

new colormaps#699

Merged
lazarusA merged 12 commits into
mainfrom
la/new_colormaps
Jul 21, 2026
Merged

new colormaps#699
lazarusA merged 12 commits into
mainfrom
la/new_colormaps

Conversation

@lazarusA

Copy link
Copy Markdown
Member

This PR moves us away from using js-colormaps-es and predefined colormap icons. Now all is handle in the browser directly via color-schemes-js with more than 1k colormaps to choose from.

Unfortunately, I could not find an existing package with all the colormaps I would like to have, so I did the port color-schemes-js from the Julia package, ColorSchemes.jl.

This mainly closes #419 (other requests there should be considered in different issues).

The new added package will also allow us to easily do categorical sampling and other advance color shenanigans, see #264 (this should be addressed in a different PR).

Screenshot 2026-07-21 at 18 03 52 Screenshot 2026-07-21 at 18 03 25 Screenshot 2026-07-21 at 18 02 52 Screenshot 2026-07-21 at 18 02 43 Screenshot 2026-07-21 at 18 02 30

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces the js-colormaps-es dependency with color-schemes-js and introduces a redesigned colormap selection UI featuring search, category filtering, and CSS-based gradient rendering. Feedback focuses on addressing a double-update and double-disposal bug in the Colormaps component's useEffect hook, optimizing a performance bottleneck in resolveColorSchemeName via caching, and adding defensive checks to evaluateColorMap to handle out-of-bounds values and missing schemes safely.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/components/ui/MainPanel/Colormaps.tsx Outdated
Comment thread src/components/textures/colormap.tsx
Comment thread src/components/textures/colormap.tsx
@lazarusA
lazarusA merged commit 044aed5 into main Jul 21, 2026
6 checks passed
@TheJeran

Copy link
Copy Markdown
Collaborator

really nice!

Only changes I would suggest is putting 'Current' next to the name of the current cmap, just keep 'Flip' for the button text, and changing the search bar text to 'Global search' or something to indicate it's not just the current list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add more colormaps and features

2 participants