Skip to content

fix: darken building colors for better visibility#142

Closed
fank wants to merge 1 commit intomainfrom
fix/darken-building-colors
Closed

fix: darken building colors for better visibility#142
fank wants to merge 1 commit intomainfrom
fix/darken-building-colors

Conversation

@fank
Copy link
Member

@fank fank commented Feb 6, 2026

Summary

  • Buildings on PMTiles maps were rendered in their original WRP colors (mostly white), making them barely visible
  • Added a darkenedColorExpr() MapLibre style expression that interpolates the data-driven color 50% toward black at render time
  • Applies to both flat fills (house) and 3D extrusions (house-extrusion)
  • Works immediately on existing tiles — no re-import needed

Test plan

  • Verify buildings appear as visible gray instead of white on an existing map
  • Confirm 3D extrusions are also darkened
  • Check that non-white buildings retain relative color differences

White buildings were barely visible on the map. Use interpolate-hcl
style expression to darken the data-driven color halfway toward black,
affecting both flat fills and 3D extrusions at render time.
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/OCAP2/web/internal/maptool 12.98% (+0.02%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/OCAP2/web/internal/maptool/styles.go 34.10% (+0.05%) 610 (+5) 208 (+2) 402 (+3) 👍

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

@fank fank closed this Feb 7, 2026
@fank fank deleted the fix/darken-building-colors branch February 7, 2026 13:57
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