Workbook: IsoChroma - The Cartographic Color Workbench
Welcome to IsoChroma, a high-precision instrument for cartographic color design. Unlike standard color pickers, IsoChroma leverages perceptual color science (CIELCH / HCL) and rigorous gamut validation to ensure your palettes are mathematically sound, aesthetically pleasing, and accessible to all users.
This workbook serves as a comprehensive guide to mastering the IsoChroma environment.
1. Core Philosophy: The Perceptual Advantage
Traditional RGB and Hex-based workflows are "device-dependent," meaning $50\%$ brightness in one space might look different in another. IsoChroma uses the CIELCH (Lightness, Chroma, Hue) model:
- Lightness (L): Perceived brightness (0-100).
- Chroma (C): Purity or intensity of the color (0-150+).
- Hue (h): The "color" itself (0-360°).
By fixing Lightness while varying Hue or Chroma, you create palettes with perceptual uniformity, ensuring that no single color in a map stands out simply because it "glows" more than others.
All color calculations happen on the backend color engine (Python / colour-science), making it the single source of truth. The frontend never computes colors locally, every hex, RGB, CMYK, LAB, and OKLCH value you see has been resolved server-side for mathematical precision.
2. Navigating the Interface
The application is organized into a three-step sequential workflow with a sticky right sidebar for mode selection:
Right Sidebar: Ramp Type Selector
The sidebar on the right side of the screen is always visible. It contains six buttons to switch between ramp modes:
- Sequential — Low-to-high progressions
- Diverging — Two-wing ramps meeting at a neutral center
- Graduated — Multi-stop mathematical interpolation
- Qualitative — Categorical palettes for distinct groups
- Cyclic — Closed-loop periodic ramps
- Bivariate — 2D matrix for two-variable mapping
Switching modes clears the current selection and resets the workbench to the new mode's default configuration.
Step 1: Color Input
- Hue Chroma Selector: A circular color wheel where the angle represents Hue and the distance from center represents Chroma. The boundary edge is the maximum saturation the current gamut allows at the current lightness. Center is neutral gray.
- Gamut Selector: A dropdown in the Hue Chroma panel header lets you switch between sRGB and Display P3. The entire application (grid, envelope, interpolation) recalculates when you change the gamut.
- Lightness Slider: A vertical bar with a draggable handle (0–100%). The slider includes cartographic reference tick marks:
- 96% — Paper / Page Background
- 78% — Basemap / Soft Highlights
- 56% — Thematic / Neutral
- 18% — Deep Ink / Grid Lines
- Footer shows:
CIE L* {value} · D65 Illuminant · Neutral gray axis - Anchor Details: A tabular panel showing precise coordinates for every active anchor. Each row displays seven columns:
| Column | Description |
|---|---|
| ID | Marker identifier (●, A, B, S, E, or anchor numbers for Cyclic) |
| HEX | Editable hex input — press Enter to resolve via backend |
| RGB | Editable RGB triplet — press Enter to resolve |
| OKLCH | Editable OKLCH triplet — press Enter to resolve |
| CMYK | Read-only print reference values |
| LAB | Read-only scientific reference values |
| Color Name | Human-readable name (i.e., "NYC TAXI", "DEEP CERULEAN") |
The HEX field shows a gold border when the entered color has been clamped to sRGB gamut from a wider Display P3 original. This visual indicator warns you that the displayed HEX is an approximation of your true P3 color.
The number of rows changes dynamically based on the the Ramp Type you select:
- Sequential / Qualitative: 1 row (● Main Selection)
- Diverging / Bivariate: 2 rows (A + B)
- Graduated: 2 rows (S = Start, E = End)
- Cyclic: 2–4 rows (one per anchor)
Step 2: Workbench
This is where you define the structure of your color ramp. The panel content changes based on the ramp type selected in the sidebar (see Section 3).
Below the workbench panel, you'll find:
- Selected Ramp strip — A horizontal swatch bar showing all currently selected colors. The count is displayed as "Selected Ramp (N)".
- ✕ CLEAR button — Removes all selected colors from the ramp.
- Export ▾ dropdown — Download your palette in various formats (see Section 6).
- Apply to Map button — Pushes the current ramp colors to the map preview in Step 3.
- View Accessibility Mode tabs — Switch the ramp preview between Normal, Deutan, Protan, Tritan, and Projector simulations (see Section 5).
Step 3: Map Preview & Legend
- Map Preview: A real-time MapLibre GL map showing US Counties on a CartoDB Positron basemap. Your palette is applied using MapLibre expressions to paint each county based on synthetic data fields appropriate to the current ramp type.
- Legend Builder: A detailed breakdown of your colors with multiple view modes depending on the ramp type (see Section 4).
3. The Workbench: Creating Color Ramps
A. Sequential & Diverging (The Digital Munsell Sheet)
For data that flows from low-to-high (Sequential) or diverges from a neutral center (Diverging).
- Sheet with Color Swatches & Floating Marker: A 2D grid of Chroma vs. Lightness.
- Color swatches: A grid of quantized colors computed based on the marker.
- Floating Marker: A precise circular cursor floats above the grid, showing the exact color position (uncoupled from grid quantization) for high-fidelity selection.
- Click to Select: Left-click any cell to add it to your ramp. Colors are auto-sorted by lightness.
- Right-Click to Remove: Right-click any selected cell to remove it from the color ramp.
- High-Fidelity Gamut: The grid renders in Display P3 by default, using vivid
color(display-p3 ...)values to eliminate sRGB clipping artifacts. Out-of-gamut cells are hidden. - Anchor A & B: In Diverging mode, the workbench splits into three columns:
- Anchor A (left): A Chroma-Lightness grid for the first hue, with chroma mirrored (high on the left, low toward center).
- N (center): A narrow Neutral column showing a vertical strip of grays from L=0 to L=100. Click here to add neutral midpoint colors.
- Anchor B (right): A Chroma-Lightness grid for the second hue.
- All three columns are row-aligned so the same lightness level is always on the same horizontal line.
B. Graduated (Mathematical Interpolation)
For creating smooth, multi-class progressions with independent Start and End anchor colors.
- Start (S) and End (E) Anchors: Unlike Sequential (which uses one hue), Graduated gives each endpoint its own Lightness, Chroma, and Hue. These are controlled via the Color Wheel (two markers: S and E) and the Anchor Details panel.
- Steps: Choose a discrete class count: 3, 4, 5, 7, or 9 color bands for classified choropleth maps.
- Smooth: When OFF, the ramp produces distinct, uniform color bands — one per class. When ON, it generates a continuous gradient (128 samples) with no visible steps, suitable for heatmaps, elevation tints, or any unclassified surface.
- Distribution (Easing): A slider from Highlight ↔ Linear ↔ Shadow:
- Highlight (left): Compresses the light end of the ramp, spreading more detail in the bright colors.
- Linear (center): Even spacing.
- Shadow (right): Compresses the dark end, spreading more detail in dark tones.
- Hue Path:
- Shortest: The most direct transition between hues. The system shows
(CW IS SHORTEST)or(CCW IS SHORTEST)as an indicator. - CW / CCW: Force the interpolation to travel Clockwise or Counter-Clockwise around the color wheel.
- Imhof Mist: Named after Swiss cartographer Eduard Imhof, this applies an atmospheric fog effect to the lower 40% of the ramp. Lightness is blended toward white (up to 50% intensity), and chroma is reduced proportionally. The result simulates how distant, low-elevation terrain appears washed out and hazy due to atmospheric scattering — lowlands look misty while mountain peaks remain vivid. Designed specifically for hypsometric/elevation tinting in topographic maps.
C. Qualitative (Categorical Palettes)
For distinct groups (e.g., Land Use, Political Parties).
- Palette Size: Choose the number of classes from 3, 4, 5, 6, 8, 10, or 12.
- Material Aesthetic: Choose between Watercolor (Vellum), Acrylic (Modern), Oil Paint (Vivid), or Pastel (Chalk). Each style constrains chroma and lightness ranges to evoke a visual aesthetic.
- Surface Finish: Select Matte, Satin, or Gloss to fine-tune the palette's visual texture.
- L-Lock (Luminosity Lock): When OFF (default), each generated color receives a random lightness value within the style's allowed range. This adds visual variety but can make some colors appear heavier or more dominant than others. When ON, every color in the palette gets the exact same lightness — specifically the midpoint of the range. This ensures perceptual uniformity so no single category visually "pops" or "recedes" due to lightness differences.
| L-Lock | Lightness Values (5-class example) | Effect |
|---|---|---|
| OFF | L*=45, 72, 58, 80, 51 | Varied weight, more visual diversity |
| ON | L*=62.5, 62.5, 62.5, 62.5, 62.5 | Equal visual weight, differ only in hue/chroma |
Tip: Use L-Lock ON when you want categories that carry equal visual importance on the map (e.g., land use classes). Use L-Lock OFF when you want more variety or intentional visual hierarchy.
- REGENERATE HARMONY: Click this button to get a fresh palette variation. Each click increments an internal seed, applying controlled random jitter to hue, lightness, and chroma while staying within the style constraints — giving you a new look without losing the overall character.
- Fallback Behavior: If the backend harmony service is unavailable, IsoChroma automatically generates a local fallback palette using equidistant hues. A warning message is displayed.
How the Harmony Algorithm Works
The marker on the Color Wheel controls three values that feed into the palette generator:
1. Hue (angle on the wheel) — The Anchor Color The marker's hue becomes the first color in the palette. The algorithm then distributes the remaining colors equidistantly around the color wheel from that anchor:
h[i] = (key_hue + i × 360° / count) % 360°
For example, picking hue 200° (blue) with 5 classes yields a palette starting at 200°, then 272°, 344°, 56°, 128°. Move the marker to hue 30° (orange) and the palette shifts to 30°, 102°, 174°, 246°, 318°. The first swatch always matches your marker.
2. Chroma (distance from center) — Saturation Influence The marker's chroma (distance from center) scales the palette's saturation range:
| Marker Position | Chroma Scale | Result |
|---|---|---|
| Center (chroma ≈ 0) | 0.3× | Very muted, pastel-like |
| Mid-range (chroma ≈ 75) | ~1.2× | Balanced saturation |
| Edge (chroma ≈ 150) | 2.0× | Maximum saturation for the style |
This scaling is applied on top of the Material Aesthetic constraints (e.g., Watercolor has chroma 10–30, Oil Paint has 60–90).
3. Lightness (the slider) — Brightness Shift The Lightness slider shifts the palette's lightness center toward your chosen value, blending with the style's natural range.
Nudging Colors in a Direction
| Want More... | Do This |
|---|---|
| Red-ish palette | Drag marker near 0° (top of wheel) |
| Blue-ish palette | Drag marker near 240° (bottom-left) |
| Green-ish palette | Drag marker near 120° (right side) |
| More saturated | Drag marker toward the edge (high chroma) |
| More muted/earthy | Drag marker toward the center (low chroma) |
| Lighter tones | Move the Lightness slider up |
| Deeper tones | Move the Lightness slider down |
| Different variation | Click REGENERATE HARMONY |
D. Cyclic (Multi-Anchor Loops)
For periodic data like wind direction, compass aspect, or hours of the day.
- The Loop: Start with 2 anchors and add up to 4 total. IsoChroma automatically closes the loop by appending the first anchor as the final node, ensuring a seamless transition.
- Steps: Choose from 12, 16, 24, 36, or 128 output samples. Use 128 for smooth continuous cyclic ramps.
- Lightness Lock: All anchors share the single global Lightness value from the Lightness Slider to prevent "flicker" in cyclic visualizations.
- Per-Anchor Control: Each anchor displays a color swatch (resolved via backend) and has independent Hue (0–360°) and Chroma (10–100) sliders.
- + ADD / − REMOVE: Buttons to add or remove anchors (minimum 2, maximum 4).
How Multi-Anchor Cyclic Ramps Work
The ramp is divided into equal segments between consecutive anchors, with shortest-path hue interpolation in each segment:
| Anchors | Closed Loop | Segments | Effect |
|---|---|---|---|
| 2 (A, B) | A → B → A | 2 halves | Two-tone oscillation (e.g., warm ↔ cool) |
| 3 (A, B, C) | A → B → C → A | 3 thirds | Triadic zones (e.g., 120° apart for RGB-like distribution) |
| 4 (A, B, C, D) | A → B → C → D → A | 4 quarters | Quadrant mapping (e.g., N/E/S/W aspects, wind roses) |
Each added anchor creates tighter control over where the ramp passes through the color wheel, giving you more precise routing of the hue path.
E. Bivariate (2D Matrix)
For mapping two variables simultaneously (e.g., Density vs. Area).
- Matrix Size: Generate grids from 2×2 up to 5×5.
- Corner Logic: IsoChroma uses the Stevens Style approach. Two anchor colors (A and B) define opposite corners, a Neutral corner is derived automatically (light, low-chroma tint at the midpoint hue), and a Combined corner is calculated as the dark, high-chroma intersection. The system automatically interpolates the entire 2D matrix from these four corners.
- Mixing Strategy:
- Bilinear: Standard linear interpolation across both axes (ideal for most thematic maps).
- Multiply: A subtractive blending mode that simulates overlapping ink layers (useful for specific cartographic styles).
4. Legend Builder Views
The Legend Builder automatically adapts its display to the current ramp type:
Discrete Legend (Sequential, Diverging, Graduated Stepped, Qualitative)
A tabular layout with one row per color class. Each row shows:
| Column | Content |
|---|---|
| Swatch | A 32×32 px colored square |
| HEX | The hexadecimal color code |
| RGB | Red, Green, Blue triplet |
| OKLCH | Perceptual Lightness, Chroma, Hue |
| CMYK | Cyan, Magenta, Yellow, Key (for print) |
| LAB | CIE Lab* values (for science) |
| Color Name | Human-readable name |
Continuous Legend (Graduated Smooth)
When Graduated is set to Smooth / ON, the legend shows:
- A tall vertical gradient bar (128 samples rendered as a CSS linear-gradient).
- Start Anchor label with name and hex at the top.
- End Anchor label with name and hex at the bottom.
- Horizontal tick lines connecting the gradient to the labels.
Cyclic Legend (Donut Wheel)
For Cyclic ramps, the legend renders an SVG donut chart:
- Color wedges are arranged radially (0° = top, clockwise).
- Each wedge represents one step in the cyclic ramp.
- Tick marks at wedge boundaries.
- Anchor indicators: Small triangular markers on the outer ring show where each user-defined anchor sits in the hue wheel.
- Below the donut: Loop Anchor hex, color name, and total step count.
Bivariate Legend (Matrix Grid)
For Bivariate ramps, the legend displays:
- An NxN color matrix grid (matching the configured matrix size).
- Corner labels: LOW/LOW, HIGH/LOW, LOW/HIGH, HIGH/HIGH.
- Axis labels: Variable A → (horizontal) and Variable B → (vertical).
- Matrix size and blending mode indicator (e.g., "3×3 MATRIX • BILINEAR").
- A loading spinner with "Computing NxN Matrix..." message while the backend calculates.
5. Accessibility & Diagnostics
IsoChroma is built for "inclusive cartography." Below the Selected Ramp strip, you can toggle View Mode tabs that apply CVD simulations to the ramp preview:
- Normal: Your original colors.
- Deutan: Simulates deuteranopia (red-green, most common).
- Protan: Simulates protanopia (red-green, severe).
- Tritan: Simulates tritanopia (blue-yellow, rare).
- Projector: Simulates the "washout" effect of a boardroom projector, including black lift and contrast compression. Use this to ensure your presentation will be legible in real-world conditions.
All simulations are computed server-side using the colour-science library for accuracy.
6. Export & Apply
Apply to Map
Click Apply to Map to push your selected colors to the US Counties map preview. The map uses MapLibre GL step/match expressions to classify counties based on synthetic data:
| Ramp Type | Data Field | Description |
|---|---|---|
| Sequential | seq_val | Inverted distance from geographic center — concentric rings |
| Diverging | div_val | Longitude gradient (East vs. West from center) |
| Qualitative | qual_val | State FIPS code — each state gets a category |
| Cyclic | cyclic_val | Compass angle from nearest USA regional center (0–360°) |
| Graduated | grad_val | Deterministic hash per county (0–100) |
| Bivariate | bivar_x, bivar_y | Normalized longitude (X) and latitude (Y) |
Export Formats
Use the Export ▾ dropdown to download your palette:
| Format | Extension | Use Case |
|---|---|---|
| QGIS | .qml | Import directly into QGIS as a layer style |
| SLD | .sld | OGC Styled Layer Descriptor for GeoServer / MapServer |
| JSON | .json | Machine-readable palette with LCH metadata |
| CSS Variables | .css | CSS custom properties (:root { --ramp-1: #...; }) |
Files are named isochroma_{rampType}_{timestamp}.{ext} and downloaded via the browser.
7. Color Gamut & Input Behavior
IsoChroma defaults to Display P3, offering ~25% more colors than standard sRGB (e.g., vivid cyans and greens).
Gamut Selection
The gamut dropdown is located in the Hue Chroma Selector panel header. Switch between:
- sRGB: Standard gamut for legacy monitors and web-safe workflows.
- Display P3: Wide gamut for modern displays (i.e., high-end monitors). Uses CSS Color Level 4 syntax (
color(display-p3 ...)).
Changing the gamut recalculates the gamut envelope (the wheel boundary), the Chroma-Lightness grid, and all resolved anchor colors.
The "HEX Jump"
If you manually enter a HEX code (which is sRGB by definition) while in P3 mode, you may see the color "jump" slightly. This is expected behavior: the system snaps the sRGB value to its precise mathematical location in the wider P3 space. The gold border on the HEX input field indicates that the displayed hex is an sRGB-clamped approximation of a wider-gamut color.
Manual Input Resolution
You can type values directly into the HEX, RGB, or OKLCH fields in Anchor Details and press Enter. The backend resolves the input to all other formats and updates the Color Wheel marker position accordingly. This is useful for matching exact brand colors or scientific reference values.
Recommendation: Use the visual Color Wheel or Floating Marker for the smoothest, high-fidelity design experience. Use HEX/RGB/OKLCH input only when you need to match a specific value.
8. Pro Tips for Power Users
- Gamut Awareness: IsoChroma defaults to Display P3 for modern wide-gamut displays. If your target audience uses standard office monitors, switch to sRGB via the dropdown in the Hue Chroma Selector to ensure colors aren't clipped.
- Right-Click to Remove: In the Chroma-Lightness grid (Sequential / Diverging modes), right-click any selected swatch to remove it from the ramp.
- Cartographic Lightness: When building sequential ramps, aim for a Lightness spread of at least 30 points to ensure sufficient contrast on a map. Use the Lightness Slider's cartographic tick marks as guides.
- The Name Game: Every color has a human-readable name (e.g., "Deep Cerulean"). These appear in both Anchor Details and the Legend Builder. Use them in your project documentation for better team communication.
- Export Early, Export Often: Use JSON export to capture not just hex values but also the LCH metadata of each color, preserving the perceptual intent of your palette.
- Graduated Endpoints: The Graduated ramp has independent Start and End anchors — each with its own Lightness, Chroma, and Hue. This allows multi-hue ramps (e.g., yellow → blue) rather than single-hue progressions.
- Imhof Mist for Terrain: When creating hypsometric tints, enable Imhof Mist and set the Lightness Slider to ~56% (Thematic). The lower 40% of your ramp will automatically desaturate and lighten, mimicking atmospheric haze on lowlands.
- Bivariate Tip: Start with a 3×3 Bilinear matrix. Place Anchor A at a warm hue (e.g., orange 30°) and Anchor B at a cool hue (e.g., blue 240°). The system will compute a pleasing 9-color grid with a neutral center.
9. Hands-On Tutorial: The "Taxi & Thunder" Diverging Ramp
Let's walk through a real-world example to see how IsoChroma handles color physics. We will create a diverging ramp using a bright yellow and a cool blue.
Step 1: Set the Stage (Lightness)
- Go to the Lightness slider in the center panel.
- Slide it up to 78%.
- Why? We want a bright, friendly map palette. By locking this first, we ensure every color we pick effectively matches in brightness.
- Color Information:
- Standardized Formats: The workbench displays colors in HEX, sRGB, CMYK, CIELAB, and OKLCH across both the Anchor Details and Legend Builder panels.
- Gamut Warnings: If a color falls out of the target gamut (sRGB or P3), the HEX field shows a gold border and the system reports it as clamped. The values shown remain mathematically precise based on the backend color engine.
Step 2: Select Diverging Mode
- In the Right Sidebar, click Diverging.
- The workbench splits into three columns: Anchor A, N (Neutral), and Anchor B.
- The Color Wheel now shows two markers (A and B).
Step 3: Place Your Anchors
- Anchor A: Drag the "A" marker to the right side of the wheel (around 3 o'clock).
- Target: A rich, golden yellow.
- Result: You might see the name NYC TAXI in the Anchor Details row.
- Anchor B: Drag the "B" marker to the bottom-left (around 7 o'clock).
- Target: A sky blue.
- Result: You might see the name THOR'S THUNDER.
Step 4: Read the "Wings"
Look at the Workbench grid. You don't just see a simple gradient; you see the shape of the color space.
- Left Wing (Yellow): Notice how wide it is? Yellow naturally stays colorful (high Chroma) even when it's very bright.
- Right Wing (Blue): Notice how it might look different? Physics dictates that blues behave differently than yellows at high lightness.
Step 5: Build the Ramp
- Click cells in the Anchor A grid to select high-chroma yellows.
- Click a gray in the N column for your neutral midpoint.
- Click cells in the Anchor B grid to select blues.
- Watch the Selected Ramp strip below fill up. Colors auto-sort: A colors (ascending lightness), Neutral, then B colors (descending lightness).
Step 6: Test Accessibility
- Click the Deutan tab in the View Mode strip.
- Check that your yellow and blue wings still look distinct under red-green CVD simulation.
Step 7: Apply & Export
- Click Apply to Map — your diverging ramp is painted across the US Counties, showing an East-West longitude gradient.
- Click Export ▾ → QGIS (.qml) to download a style file you can import directly into your GIS project.
Step 8: The Floating Markers
You will see two small circular markers floating above the grid (one Yellow, one Blue).
- What are they?: These represent the exact position of your anchors.
- Why is it floating in empty space?: If your marker is far from the nearest color chip, you are pushing the edge of physics! The grid hides cells that are "out of gamut" (impossible to reproduce). Your specific anchor point is valid, but the surrounding grid "bucket" is too volatile or out-of-bounds to safely display.
- Interaction: They respond to your movements on the Color Wheel and Lightness Slider. Think of them as the "GPS dot" on your color map.
The Takeaway: You created a palette where a bright Yellow and distinct Blue meet perfectly in the middle at a neutral Gray, verified it's accessible under CVD, and exported it for your GIS project — all backed by perceptual color science.
10. Architecture at a Glance
| Layer | Technology | Role |
|---|---|---|
| Frontend | React 19 + TypeScript + Vite | UI with Color Wheel, Grid, Legend, Map |
| State Management | React Context (3-context split: State, Dispatch, API) | Centralized color state with debounced API calls |
| Backend | Django 6 + Python colour-science | Color engine, gamut computation, CVD simulation |
| Map | MapLibre GL JS | Vector tile map rendering with dynamic expressions |
| Basemap | CartoDB Positron | Light "Gray Lite" basemap for thematic mapping |
| Data | US Counties GeoJSON with synthetic attributes | 6 data fields for ramp type demonstration |
| Export | Client-side generation | QML, SLD, JSON, CSS files via Blob download |
Generated by IsoChroma — The Cartographic Color Workbench.