mirror of
https://github.com/pablorevilla-meshtastic/meshview.git
synced 2026-10-31 03:01:58 +01:00
fix: make non-preset channel colors visible on the map (#164)
The fallback palette used for channels that are not Meshtastic presets was built out of pastels, which are unreadable against the light OSM tiles. Six of the nine entries scored under 1.6:1 contrast on the map: #fffac8 at 1.06:1 and #aaffc3 at 1.18:1 were effectively invisible, leaving only the white marker outline showing. The underlying issue is that one color feeds two opposite backgrounds. The marker fill sits on light map tiles, while the filter label is text on the dark Bootstrap panel. The old palette was calibrated only for the panel. Replace it with 12 colors chosen by a search over HSL, constrained to clear 3:1 contrast against both backgrounds, stay at deltaE >= 30 from every channelColorOverrides preset, and deltaE >= 20.9 from each other. Saturation is capped at 80% to keep out neon tones that would collide with ShortTurbo. Growing the palette from 9 to 12 entries is safe: the index is derived from palette.length rather than a fixed number.
This commit is contained in:
1 parent
31ca098de5
commit
e9e66b2dfb
1 file changed
+5
-2
@@ -207,8 +207,11 @@ const UNMAPPED_TTL_MS = 5000;
|
|||||||
|
|
||||||
const portMap = window.PORT_LABEL_MAP;
|
const portMap = window.PORT_LABEL_MAP;
|
||||||
|
|
||||||
const palette = ["#bcf60c","#fabebe","#e6beff","#9a6324","#fffac8","#800000","#aaffc3","#ffd8b1",
|
// Fallback colors for channels that are not Meshtastic presets.
|
||||||
"#808080"];
|
// Every entry clears 3:1 contrast against both the light map tiles and the dark
|
||||||
|
// filter panel, and stays perceptually far from every channelColorOverrides value.
|
||||||
|
const palette = ["#18aa18","#976049","#a5508c","#1898dc","#3a8846","#dc1884",
|
||||||
|
"#b8813d","#b64f35","#408b18","#4c719e","#be379c","#18aa52"];
|
||||||
|
|
||||||
const channelColorOverrides = {
|
const channelColorOverrides = {
|
||||||
longfast: "#4363d8",
|
longfast: "#4363d8",
|
||||||
|
|||||||
Reference in new issue
Block a user