derf / travelynx

Traewelling-inspired journey logger with realtime data
https://travelynx.de
GNU Affero General Public License v3.0
102 stars 16 forks source link

Improvement suggestions: Use local colors #94

Open Ein-Tim opened 8 months ago

Ein-Tim commented 8 months ago

With version 2.5 of travelynx, when checking in, one can better differentiate between ICEs, REs, subways, suburban trains, buses, and so on. However, this only has general colors (e.g., blue for all subways, green for all suburban trains, purple for all buses). In my city (Munich), and as far as I know also in other big cities, undergrounds, and subways have specific colors assigned to them. Are these colors somewhere available in the APIs you're using and could be used as display colors?

deingithub commented 8 months ago

As far as I know there's no database of all those colors collected so it would be a manual effort to add new cities — though a manageable one considering there's just not that many U-Bahn and S-Bahn systems in the area covered by HAFAS — the issue is how to tell which system the train you're looking at belongs to. This is fairly easy with the München U-Bahn, because you can fairly easily look up if the current train a) is an U-Bahn and b) has any stop whose name ends with ", München" on its route. The issue is that this generalizes poorly — on another project i'm struggling to tell apart Stadtbahn Karlsruhe trains from S-Bahn Rhein-Neckar trains, the only reliable indicator at this point is that the train numbers of the latter currently start with 38 or 22, and this is in no way future-proof. So a scheme like this would be easy to implement for some cities but could wind up being arbitrarily complicated for others.

derf commented 8 months ago

There is https://traewelling.github.io/line-colors/, but I haven't decided whether I want to incorporate that or leave it generic yet.

Ein-Tim commented 8 months ago

Thank you for the prompt response!

So a scheme like this would be easy to implement for some cities but could wind up being arbitrarily complicated for others.

I see. I guess it wouldn't be too bad to just implement it for the cities it's easy to implement, but I also understand that the ambition is to be consistent all over the system.

There is https://traewelling.github.io/line-colors/, but I haven't decided whether I want to incorporate that or leave it generic yet.

What would, from your point of view, speak against implementing it? Or do you have the same concerns as @deingithub?

Looking at https://traewelling.github.io/line-colors/, it definitely comes to show that, as they say, that's far from complete.

I, personally, would see a great benefit for users to have the already known colors used by the local U-Bahn/S-Bahn/Tram lines, as this makes the travelynx UI feel more known. However, I also see the risk of an implementation where some stuff is in the local colors and other is not and it confuses the user.

I'm not sure what the right way to go about this is just yet, I'll have to think about it.