Skip to content

0.1.0-beta.19: count numbers in black or white by the marker's color - #36

Merged
alexandermccormick merged 1 commit into
mainfrom
fix/count-text-contrast
Nov 17, 2026
Merged

alexandermccormick merged 1 commit into
mainfrom
fix/count-text-contrast

Conversation

@alexandermccormick

Copy link
Copy Markdown
Member

Count numbers read on every level colour. pointsPlugin's count markers and count cluster bubbles now draw their number in black or white, whichever contrasts more with the marker's colour.

  • It uses color2k's readableColor, as the level chips do; a feature with no level is measured against the neutral colour.
  • Before, the number was --background. On the spray notices' pink (#e64980) that gave 3.43:1 in the light theme, under WCAG 1.4.3's 4.5:1 for text; black gives 5.63:1 in both themes.
  • The --background edge stays, since it separates the marker from the basemap.
  • readableTextExpression(scale, "value", neutral) is new and exported beside colorExpression.

This is the user's decision from the dashboard session.

Checks

  • Tests, seen failing first: black on a light level and white on a dark one; the no-level fallback under a light and a dark neutral colour; black on the notices' pink; and the marker and cluster paint.
  • Suites: lint, svelte-check, npm test (1279 passed), test:bundle, test:licenses, and e2e in Chromium and Firefox (86 passed).

Version 0.1.0-beta.19. README "Changes", the count paragraph and the CLAUDE.md line are updated.

@alexandermccormick
alexandermccormick merged commit 862453c into main Nov 17, 2026
1 check passed
@alexandermccormick
alexandermccormick deleted the fix/count-text-contrast branch November 17, 2026 00:01
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.

1 participant