traewelling / line-colors
Installs: 0
Dependents: 1
Suggesters: 0
Security: 0
Stars: 44
Watchers: 7
Forks: 51
Open Issues: 18
Language:CSS
pkg:composer/traewelling/line-colors
This package is auto-updated.
Last update: 2025-10-12 10:38:06 UTC
README
This repository is made for collecting line colors in public transport lines, so they can be displayed on systems using DB HAFAS.
Structure
The line-colors.csv contains several columns:
shortOperatorName: Short operator name (i.e. vehicle keeper marking/"Halterkürzel" or another identifier for EVU) and a local transport network abbreviationlineName: Displayed line namehafasOperatorCode: used to identify the correct line, if line id is not distinct. Can be empty!hafasLineId: identifies the HAFAS line - you can get this by requesting a departure for the line from HAFAS (i.e. using db-rest playground)backgroundColor: Color-Hexcode for the display background colortextColor: Color-Hexcode for the text colorborderColorColor-Hexcode for the border of the shapeshape: Specifies the shape of the icon --> see examples belowcircle: Just a circlehexagonA pill with pointy tipsrectangle: Just a rectanglerectangle-rounded-corner: Rectangle with rounded cornerspill: Rectangle with completely rounded cornerstrapezoidA trapezoid shape with a broad top and a narrow bottom side
wikidataQid: Wikidata QID for the line (if available, can be empty)delfiAgencyID: Agency ID (for example train operating company) that is used in the DELFI GTFS feed (if available, can be empty)delfiAgencyName: Agency name that is used in the DELFI GTFS feed (if available, can be empty)
Contributing
If a line operates in a local transport network/"Verkehrsverbund", the network's line color shall be preferred.
Local transport networks usually have line colors for:
- suburban lines / "S-Bahn"
- subway lines / "U-Bahn"
- tramway lines / "Straßenbahn, Stadtbahn"
- bus lines / "Bus"
If a single line operates in multiple transport networks, the color communicated by the operator shall be preferred.
I'd be very happy if this file could expand very fast, so please feel free to add more lines by opening a PR.
Please keep the PR's small. If possible, create a small PR for each operator.
BUT FIRST
- Check that entries are sorted first by
shortOperatorNameand thenlineName - Reference a source in your PR where data can be proved (somewhere from the internet, like a timetable PDF...)
- Also add it to
sources.json.
- Also add it to
- All entries in the CSV (except
lineName) shall be in lower case
THEN
- Please checkout at the latest commit of the
mainbranch and create a new branch from there - Ensure that the validation tests (after pr is created) pass
optionally but recommended: Wikidata (why?)
- try to find the Wikidata QID for the line and add it to the
wikidataQidcolumn- You can use this list to find the QID
- if there is no Wikidata item for the line, it would be great if you could create one
Examples
Die Länderbahn GmbH DLB, RE72
shortOperatorName: alex-dlblineName: RE 23hafasOperatorCode: alex-die-landerbahn-gmbh-dlbhafasLineId: re23backgroundColor: #fffffftextColor: #006666borderColor#006666shape: rectanglewikidataQidQ130542294delfiAgencyID10837delfiAgencyNamealex - Die Länderbahn GmbH DLB
Entry: alex-dlb,RE 23,alex-die-landerbahn-gmbh-dlb,re23,#ffffff,#006666,#006666,rectangle,Q130542294,10837,alex - Die Länderbahn GmbH DLB
DB Regio AG S-Bahn München, S7
shortOperatorName: mvv-db-sbmlineName: S7hafasOperatorCode: db-regio-ag-s-bahn-munchenhafasLineId: 4-800725-7backgroundColor: #8a372ftextColor: #ffffffborderColordoes not applyshape: pillwikidataQidnot availabledelfiAgencyID15017delfiAgencyNameDB Regio AG S-Bahn München
Entry: mvv-db-sbm,S7,db-regio-ag-s-bahn-munchen,4-800725-7,#8a372f,#ffffff,,pill,,15017,DB Regio AG S-Bahn München
KVV: Albtal-Verkehrs-Gesellschaft mbH, S1
shortOperatorName: kvv-avglineName: S1hafasOperatorCode: albtal-verkehrs-gesellschaft-mbhhafasLineId: 4-a6s8-8backgroundColor: #6e692atextColor: #ffffffborderColordoes not applyshape: rectangle-rounded-corner (a pill with less rounded corners)wikidataQidnot availabledelfiAgencyID10836delfiAgencyNameAlbtal-Verkehrs-Gesellschaft
Entry: kvv-avg,S8,albtal-verkehrs-gesellschaft-mbh,4-a6s8-8,#6e692a,#ffffff,,rectangle-rounded-corner,,10836,Albtal-Verkehrs-Gesellschaft
HVV: Hadag, 62
shortOperatorName: hvv-hadlineName: 62hafasOperatorCode: not availablehafasLineId: 6-hvvhad-62backgroundColor: #009bb6textColor: #ffffffborderColordoes not applyshape: trapezoid (a shape with a broad top and a narrow bottom side)wikidataQidnot availabledelfiAgencyID15139delfiAgencyNameHADAG-ZVU
Entry: hvv-had,62,,6-hvvhad-62,#009bb6,#ffffff,,trapezoid,,15139,HADAG-ZVU
HVV: Hamburger Hochbahn AG, X35
shortOperatorName: hvv-hhalineName: X35hafasOperatorCode: not availablehafasLineId: 5-hvvhha-x35backgroundColor: #eb452etextColor: #ffffffborderColordoes not applyshape: hexagon (a pill with pointy tips)wikidataQidnot availabledelfiAgencyID15140delfiAgencyNameHochbahn Bus
Entry: hvv-hha,X35,,5-hvvhha-x35,#eb452e,#ffffff,,hexagon,,15140,Hochbahn Bus
S-train Liege: SNCB, S41
shortOperatorName: liege-slineName: S41hafasOperatorCode: sncbhafasLineId: 4-88-41backgroundColor: #0f6030textColor: #ffffffborderColor#ffffffshape: circlewikidataQidnot availabledelfiAgencyIDnot availabledelfiAgencyNamenot available
Entry: liege-s,S41,sncb,4-88-41,#0f6030,#ffffff,#ffffff,circle,,,





