Author Topic: Overlay map color schemes  (Read 77246 times)

0 Members and 1 Guest are viewing this topic.

Offline jtstill

  • Newbie
  • *
  • Posts: 7
  • Last Login:February 15, 2025, 03:28:51 pm
Re: Overlay map color schemes
« Reply #90 on: January 21, 2025, 09:17:29 am »
For what it’s worth, it’s possible at the moment for an average user like me to see unhighlighted untraveled sections and keep what I have travelled in view, if I’m willing to dig a little: I just go to Inspect > Sources > updateConnectionColors() and update the opacity variable in that function to “1*highlight” instead of the default “0.3 + 0.55*highlight”, and then it applies the new opacity variable once I toggle the highlight options dropdown. Of course, I’d also love to see a front end way to do this, since I have to reapply those changes every time I reload the page or change the region (and the site still loads ALL segments, even the unhighlighted ones, so I can’t really do something like get the entire USA in view and then change the opacity settings, since it’ll never load. It’d be great to find a way to not even load untraveled segments so I can see the full extent of my personal travels)

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4997
  • Last Login:Yesterday at 01:50:21 pm
Re: Overlay map color schemes
« Reply #91 on: January 21, 2025, 12:31:11 pm »
I have noticed that the blue lines tend to have less contrast between segments that are highlighted and those that aren't than the other colors do, especially when zoomed out.  In fact, If I show my travels on usai to people who aren't roadgeeks, they'll assume that I've clinched the whole system because the contrast is low enough they can't tell the difference.

Yep, I think it's just an issue with TMblue. Maybe one can suggest a better setting?

https://github.com/TravelMapping/Web/blob/master/lib/tmjsfuncs.js#L113

Code: [Select]
colorCodes[0] = { name: "TMblue", unclinched: "rgb(100,100,255)", clinched: "rgb(0,0,220)" };
And https://github.com/TravelMapping/Web/issues/581 is now implemented and on the main site.

For the colors= QS param, you can still specify a pair of CSS colors for clinched and unclinched (even the same one and rely on the opacity difference to indicate clinched vs. unclinched), but also now can specify a single TM predefined color (ones used in systems.csv, now with a "TM" prefix).

QS param for usai in NY with TMblue--> https://travelmapping.net/user/mapview.php?rg=ny&colors=usai:rgb(100,100,255):rgb(0,0,220)

Offline Nagamasa

  • TM Collaborator
  • Newbie
  • *****
  • Posts: 22
  • Last Login:Yesterday at 12:35:47 pm
Re: Overlay map color schemes
« Reply #92 on: February 11, 2025, 11:22:51 am »
I think the unhighlighted salmon color is too light: I'm staring at it and I can't see it.

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4997
  • Last Login:Yesterday at 01:50:21 pm
Re: Overlay map color schemes
« Reply #93 on: February 11, 2025, 12:24:29 pm »
I think the unhighlighted salmon color is too light

That's the current color: https://travelmapping.net/user/mapview.php?rg=jpn&colors=jpnh:rgb(224,162,162):rgb(240,150,115)
Feel free to change the rgb settings by editing the url (first = unclinched, second = clinched). Once you have good settings, you can suggest it for discussion here.

Offline pderocco

  • Newbie
  • *
  • Posts: 42
  • Last Login:Yesterday at 02:46:57 am
Re: Overlay map color schemes
« Reply #94 on: February 11, 2025, 06:16:45 pm »
That's the current color: https://travelmapping.net/user/mapview.php?rg=jpn&colors=jpnh:rgb(224,162,162):rgb(240,150,115)
Feel free to change the rgb settings by editing the url (first = unclinched, second = clinched). Once you have good settings, you can suggest it for discussion here.
It looks like the first is the unhighlighted and the second is the highlighted.

Also, it appears to support rgba as well as rgb, but the unhighlighted alpha is still scaled down by the default value. At least this gives us a way of turning the unlighted ones off completely.

It would be even nicer if you could use #rrggbb or #rrggbbaa hex colors, since they're a lot more compact.

Offline Nagamasa

  • TM Collaborator
  • Newbie
  • *****
  • Posts: 22
  • Last Login:Yesterday at 12:35:47 pm
Re: Overlay map color schemes
« Reply #95 on: February 12, 2025, 11:58:13 am »
I think the unhighlighted salmon color is too light

That's the current color: https://travelmapping.net/user/mapview.php?rg=jpn&colors=jpnh:rgb(224,162,162):rgb(240,150,115)
Feel free to change the rgb settings by editing the url (first = unclinched, second = clinched). Once you have good settings, you can suggest it for discussion here.
Actually that color looks fine to me (TMlightsalmon), looks like jpnlex* were all set to TMblack. I'll just switch them all over? In the original photo, the color in question is the NW/SE rail line, which I don't think anyone even noticed.

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4997
  • Last Login:Yesterday at 01:50:21 pm
Re: Overlay map color schemes
« Reply #96 on: February 12, 2025, 01:03:11 pm »
ah, got it! Standard colors like "salmon" had bad contrast. Thus, we set up TM colors like "TMlightsalmon".
https://github.com/TravelMapping/Web/blob/master/lib/tmjsfuncs.js#L113

Offline Nagamasa

  • TM Collaborator
  • Newbie
  • *****
  • Posts: 22
  • Last Login:Yesterday at 12:35:47 pm
Re: Overlay map color schemes
« Reply #97 on: February 12, 2025, 04:13:27 pm »
Looks like it used a nonexistent color "TMblack". Changed in my branch.