fix: serve cmocean and crameri colormaps in their published orientation - #141
Open
matthiasschabel wants to merge 1 commit into
Open
fix: serve cmocean and crameri colormaps in their published orientation#141matthiasschabel wants to merge 1 commit into
matthiasschabel wants to merge 1 commit into
Conversation
Nine cmocean tables (algae, amp, deep, dense, matter, rain, speed, tempo, turbid) were stored end-for-end reversed relative to the cmocean project's own data: bit-exact reversals of what cmocean 3.0.3 loads from its rgb source files. Reversed in place; every literal is unchanged, only row order. crameri bilbao, grayC and lajolla were still the Scientific Colour Maps 7.0.1 tables: SCM 8 reversed those three and revised their values (up to 35/255 per channel after the flip). pyapp-kit#83 added the maps v8 introduced but kept the v7 tables for the ones it revised. Regenerated from the 8.0.1 deposit (zenodo 8409685), matching naviaW's source pin.
matthiasschabel
marked this pull request as ready for review
August 4, 2026 20:06
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Twelve colormaps in the catalog are served in an orientation their upstream projects don't publish — nine
cmoceanmaps stored end-for-end reversed, and threecramerimaps still carrying Scientific Colour Maps 7 tables that SCM 8 reversed and revised. This PR fixes the data files; no code changes.cmocean: nine tables are bit-exact reversals of upstream
Comparing every
cmocean:*base entry at 256 samples against the cmocean package's own loader (cmocean 3.0.3, which renders its published gallery), max abs channel difference in 8-bit units:Flipped Δ = 0 means the stored table is exactly cmocean's, read backwards. The rest of the namespace matches forward exactly (thermal, haline, ice, solar, curl, balance, …, and the cropped
balance_blue/curl_pink/delta_bluematch cmocean'srgb/*-rgb.pysource files as-is), so this is per-map, not a convention difference. The fix reverses the row order in the nine data files; every float literal is unchanged.crameri: three tables are stale SCM 7 — this completes #83
bilbao,grayCandlajollaare bit-exact matches of SCM 7.0.1 (zenodo 5501399, the__source__they cite). Fabio Crameri reversed all three in SCM 8 and revised their values beyond the flip — after reversal they still differ from 8.0.1 by up to 35/255 per channel, so a plain flip wouldn't be any published version. #83 updated the namespace to v8's new maps (naviaWhere is 8.0.1-exact) but didn't refresh the tables v8 revised.These three files are regenerated from the SCM 8.0.1 deposit (zenodo 8409685, the same pin
naviaWcites), formatted like the #83 additions,__source__updated.Reproduce
Notes
okabe_itomatplotlib-parity failures exist onmainwith matplotlib ≥ 3.10 and are unrelated).🤖 Generated with Claude Code