Add the single-hue color ramps for GeoTIFF and Zarr layers - #172
Merged
Conversation
Blues was the only light-to-dark single-hue ramp, so a raster that wanted one in any other color had no option. Adds the rest of the ColorBrewer single-hue sequential family -- Greens, Oranges, Purples, Reds -- taking the registry from 14 ramps to 18. These are the easiest ramps to read a magnitude off, and the safest choice when a raster sits under coloured vector features: a single-hue underlay cannot be mistaken for a categorical overlay the way a rainbow can. Keystops were sampled from matplotlib 3.10 at twelve evenly spaced points, matching the existing convention. matplotlib's Greens/Oranges/Purples/Reds are the ColorBrewer maps of those names. The picker gains a "Single hue" group and Blues moves into it, leaving "Sequential" for the multi-hue maps plus grayscale -- which is called out in a comment as running dark to light, the opposite direction from the single-hue family. Display order only; the persisted rampName is unchanged, so existing layers render identically. Two invariants back the new family. Luminance must fall monotonically from a near-white first stop, which is the property the family exists for and which a mis-sampled table breaks. And each ramp's channel ranking at its darkest stop must match its name, because every other assertion holds for any light-to-dark ramp -- without it, a ramp wired to the wrong hue's table passed silently, which is exactly what mutation testing caught. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Blues was the only light-to-dark single-hue ramp, so a raster that wanted one in any other color had no option. Adds the rest of the ColorBrewer single-hue sequential family -- Greens, Oranges, Purples, Reds -- taking the registry from 14 ramps to 18.
These are the easiest ramps to read a magnitude off, and the safest choice when a raster sits under coloured vector features: a single-hue underlay cannot be mistaken for a categorical overlay the way a rainbow can.
Keystops were sampled from matplotlib 3.10 at twelve evenly spaced points, matching the existing convention. matplotlib's Greens/Oranges/Purples/Reds are the ColorBrewer maps of those names.
The picker gains a "Single hue" group and Blues moves into it, leaving "Sequential" for the multi-hue maps plus grayscale -- which is called out in a comment as running dark to light, the opposite direction from the single-hue family. Display order only; the persisted rampName is unchanged, so existing layers render identically.
Two invariants back the new family. Luminance must fall monotonically from a near-white first stop, which is the property the family exists for and which a mis-sampled table breaks. And each ramp's channel ranking at its darkest stop must match its name, because every other assertion holds for any light-to-dark ramp -- without it, a ramp wired to the wrong hue's table passed silently, which is exactly what mutation testing caught.