Conversation
When a choropleth fill is painted, cluster markers switch to a high-contrast style: a white disc at 87.5% opacity with a 1px edge in the marker colour, and the count drawn in the marker colour. Pin strokes and icon halos widen from 1px to 2px. When no choropleth is painted, markers are unchanged. A white disc with a coloured edge is two-tone, so at least one tone contrasts with any background: white stands out on saturated fills and the edge on pale ones. This avoids per-scheme rules, which cannot account for the user-configurable marker colour. Pale marker colours are darkened by luminance for the edge and count so they still read against white. COOP-3729 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
joaquimds
force-pushed
the
feature/coop-3729-white-markers-when-data-viz-is-active-for-better-visibility
branch
from
September 23, 2026 13:22
f5060ca to
b917b21
Compare
joaquimds
deleted the
feature/coop-3729-white-markers-when-data-viz-is-active-for-better-visibility
branch
September 23, 2026 13:24
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.
Closes COOP-3729 — https://linear.app/commonknowledge/issue/COOP-3729/white-markers-when-data-viz-is-active-for-better-visibility
What
When a choropleth fill is painted, cluster markers switch to a high-contrast style: a white disc with a 1px edge in the marker colour, and the count drawn in the marker colour. Pin strokes and icon halos widen from 1px to 2px. When no choropleth is painted, markers are unchanged.
Pale marker colours are darkened (by luminance, preserving hue) for the edge and count so they still read against white.
Why not the per-scheme rules in the issue
Changes
ClustersLayer.tsx,PinsLayer.tsx: newonChoroplethflag branches the paint properties.Markers.tsx: derives the flag from the choropleth toggle, a selected boundary set and loaded area stats; passed throughDataSourceMarkers. Applies to public maps too.src/utils/colors.ts:getContrastingRingColorand a sharedparseRgb;colorWithAlphanow uses it.tests/unit/utils/colors.test.ts: covers the parser, alpha helper and darkening.Testing
npm run lintclean;npm test -- run tests/unit/utils/colors.test.tspasses.🤖 Generated with Claude Code