PHPackages                             traewelling/line-colors - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. traewelling/line-colors

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

traewelling/line-colors
=======================

51060[1 issues](https://github.com/Traewelling/line-colors/issues)[4 PRs](https://github.com/Traewelling/line-colors/pulls)CSSCI passing

Since Apr 3Pushed 2mo ago6 watchersCompare

[ Source](https://github.com/Traewelling/line-colors)[ Packagist](https://packagist.org/packages/traewelling/line-colors)[ RSS](/packages/traewelling-line-colors/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Public transport line colors
============================

[](#public-transport-line-colors)

This repository is made for collecting line colors in public transport lines. Because of our switch to Transitous, colors from countries other than Germany can now be collected and used as well. If your feed does not yet have its own .csv file and you would like to contribute colours, you can create a .csv (e.g. `line-colors-xxx.csv`) and submit it via a pull request (or open an issue).

Structure
---------

[](#structure)

First, you need to determine which file to use:

- `line-colors.csv` is used for the `DELFI` feed (Germany)
- `line-colors-AT.csv` is used for the `data.mobilitaetsverbuende.at` feed (Austria)
- `line-colors-CH.csv` is used for the `opentransportdata.swiss` feed (Switzerland)
- `line-colors-VBN.csv` is used for the `VBN` feed (Verkehrsverbund Bremen-Niedersachsen)

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 abbreviation
- `lineName`: Displayed line name
- `hafasOperatorCode` - only present in line-colors.csv: DEPRECATED - used to identify the correct line, if line id is not distinct. Can be empty!
- `hafasLineId` - only present in line-colors.csv: DEPRECATED - identifies the HAFAS line - you can get this by requesting a departure for the line from HAFAS (i.e. using [db-rest playground](https://petstore.swagger.io/?url=https%3A%2F%2Fv6.db.transport.rest%2F.well-known%2Fservice-desc%0A))
- `backgroundColor`: Color-Hexcode for the display background color
- `textColor`: Color-Hexcode for the text color
- `borderColor` Color-Hexcode for the border of the shape
- `shape`: Specifies the shape of the icon --&gt; see examples below
    - `circle`: Just a circle
    - `hexagon` A pill with pointy tips
    - `rectangle`: Just a rectangle
    - `rectangle-rounded-corner`: Rectangle with rounded corners
    - `pill`: Rectangle with completely rounded corners
    - `trapezoid` A trapezoid shape with a broad top and a narrow bottom side
- `wikidataQid`: Wikidata QID for the line (if available, can be empty)
- `delfiAgencyID`/`GTFSAgencyID`: Agency ID (for example train operating company) that is used in the (DELFI) GTFS feed You can find the delfiAgencyID in [DELFI's GTFS dataset](https://www.opendata-oepnv.de/ht/de/datensaetze/sharing?tx_vrrkit_view%5Bsharing%5D=eyJkYXRhc2V0IjoiZGV1dHNjaGxhbmR3ZWl0ZS1zb2xsZmFocnBsYW5kYXRlbi1ndGZzIn0)), otherwise it's the agency name and ID stated in your network's GTFS file
- `delfiAgencyName`/`GTFSAgencyName`: Agency name that is used in the (DELFI) GTFS feed

Projects using this data
------------------------

[](#projects-using-this-data)

- [Transitous](https://github.com/public-transport/transitous) | community-run provider-neutral international public transport routing service
- [Träwelling](https://github.com/Traewelling/traewelling) | check-in service to log your public transit journeys ( indirect use via Transitous)
- [Träwelldroid](https://github.com/Traewelldroid/traewelldroid) | Android app for Träwelling (indirect use via Träwelling and Transitous)

Contributing
------------

[](#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 `shortOperatorName` and then `lineName`
- 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`.
- All entries in the CSV (except `lineName`) shall be in lower case

**THEN**

- Please checkout at the latest commit of the `main` branch and create a new branch from there
- Ensure that the validation tests (after pr is created) pass

**optionally but recommended: Wikidata ([why?](https://github.com/Traewelling/line-colors/issues/91))**

- try to find the Wikidata QID for the line and add it to the `wikidataQid` column
    - You can use [this list](https://www.wikidata.org/wiki/User:Mkkagain/Verkehrslinien_in_Deutschland) to find the QID
- if there is no Wikidata item for the line, it would be great if you could [create one](https://www.wikidata.org/wiki/Special:NewItem)

Examples
--------

[](#examples)

### Die Länderbahn GmbH DLB, RE72

[](#die-länderbahn-gmbh-dlb-re72)

[![RE 23](examples/alex-dlb-re23.png)](examples/alex-dlb-re23.png)

- `shortOperatorName`: alex-dlb
- `lineName`: RE 23
- `hafasOperatorCode`: alex-die-landerbahn-gmbh-dlb
- `hafasLineId`: re23
- `backgroundColor`: #ffffff
- `textColor`: #006666
- `borderColor` #006666
- `shape`: rectangle
- `wikidataQid` Q130542294
- `delfiAgencyID` 10837
- `delfiAgencyName` alex - 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

[](#db-regio-ag-s-bahn-münchen-s7)

[![S7](examples/sbm-s7.png)](examples/sbm-s7.png)

- `shortOperatorName`: mvv-db-sbm
- `lineName`: S7
- `hafasOperatorCode`: db-regio-ag-s-bahn-munchen
- `hafasLineId`: 4-800725-7
- `backgroundColor`: #8a372f
- `textColor`: #ffffff
- `borderColor` *does not apply*
- `shape`: pill
- `wikidataQid` *not available*
- `delfiAgencyID` 15017
- `delfiAgencyName` DB 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

[](#kvv-albtal-verkehrs-gesellschaft-mbh-s1)

[![S1](examples/kvv-s1.png)](examples/kvv-s1.png)

- `shortOperatorName`: kvv-avg
- `lineName`: S1
- `hafasOperatorCode`: albtal-verkehrs-gesellschaft-mbh
- `hafasLineId`: 4-a6s8-8
- `backgroundColor`: #6e692a
- `textColor`: #ffffff
- `borderColor` *does not apply*
- `shape`: rectangle-rounded-corner (a pill with less rounded corners)
- `wikidataQid` *not available*
- `delfiAgencyID` 10836
- `delfiAgencyName` Albtal-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

[](#hvv-hadag-62)

[![62](examples/hvv-62.png)](examples/hvv-62.png)

- `shortOperatorName`: hvv-had
- `lineName`: 62
- `hafasOperatorCode`: *not available*
- `hafasLineId`: 6-hvvhad-62
- `backgroundColor`: #009bb6
- `textColor`: #ffffff
- `borderColor` *does not apply*
- `shape`: trapezoid (a shape with a broad top and a narrow bottom side)
- `wikidataQid` *not available*
- `delfiAgencyID` 15139
- `delfiAgencyName` HADAG-ZVU

Entry: `hvv-had,62,,6-hvvhad-62,#009bb6,#ffffff,,trapezoid,,15139,HADAG-ZVU`

#### HVV: Hamburger Hochbahn AG, X35

[](#hvv-hamburger-hochbahn-ag-x35)

[![62](examples/hvv-x35.png)](examples/hvv-x35.png)

- `shortOperatorName`: hvv-hha
- `lineName`: X35
- `hafasOperatorCode`: *not available*
- `hafasLineId`: 5-hvvhha-x35
- `backgroundColor`: #eb452e
- `textColor`: #ffffff
- `borderColor` *does not apply*
- `shape`: hexagon (a pill with pointy tips)
- `wikidataQid` *not available*
- `delfiAgencyID` 15140
- `delfiAgencyName` Hochbahn Bus

Entry: `hvv-hha,X35,,5-hvvhha-x35,#eb452e,#ffffff,,hexagon,,15140,Hochbahn Bus`

#### S-train Liege: SNCB, S41

[](#s-train-liege-sncb-s41)

[![S41](examples/sncb-s41.png)](examples/sncb-s41.png)

- `shortOperatorName`: liege-s
- `lineName`: S41
- `hafasOperatorCode`: sncb
- `hafasLineId`: 4-88-41
- `backgroundColor`: #0f6030
- `textColor`: #ffffff
- `borderColor` #ffffff
- `shape`: circle
- `wikidataQid` *not available*
- `delfiAgencyID` *not available*
- `delfiAgencyName` *not available*

Entry: `liege-s,S41,sncb,4-88-41,#0f6030,#ffffff,#ffffff,circle,,,`

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance57

Moderate activity, may be stable

Popularity17

Limited adoption so far

Community32

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor6

6 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ac58b3aec3dadbf487c45d852e5df107a3d350812f47dc7e658f8abefd68c4a1?d=identicon)[HerrLevin\_](/maintainers/HerrLevin_)

![](https://avatars.githubusercontent.com/u/19890220?v=4)[Träwelling](/maintainers/traewelling)[@Traewelling](https://github.com/Traewelling)

![](https://www.gravatar.com/avatar/743b006b0da12b0b2f6dbd7db63d8eaa43c7c0921163aee7dc5487822f461c4d?d=identicon)[MrKrisKrisu](/maintainers/MrKrisKrisu)

---

Top Contributors

[![wittighausen](https://avatars.githubusercontent.com/u/192908495?v=4)](https://github.com/wittighausen "wittighausen (50 commits)")[![luna-cant-code](https://avatars.githubusercontent.com/u/223513004?v=4)](https://github.com/luna-cant-code "luna-cant-code (49 commits)")[![oneiricbotcelot](https://avatars.githubusercontent.com/u/33320318?v=4)](https://github.com/oneiricbotcelot "oneiricbotcelot (35 commits)")[![metrophil](https://avatars.githubusercontent.com/u/72109316?v=4)](https://github.com/metrophil "metrophil (20 commits)")[![mtwente](https://avatars.githubusercontent.com/u/127845092?v=4)](https://github.com/mtwente "mtwente (17 commits)")[![jheubuch](https://avatars.githubusercontent.com/u/60344409?v=4)](https://github.com/jheubuch "jheubuch (16 commits)")[![MrKrisKrisu](https://avatars.githubusercontent.com/u/4103693?v=4)](https://github.com/MrKrisKrisu "MrKrisKrisu (15 commits)")[![SpielenmitLili](https://avatars.githubusercontent.com/u/74246564?v=4)](https://github.com/SpielenmitLili "SpielenmitLili (15 commits)")[![KiloBravoBFE](https://avatars.githubusercontent.com/u/81705745?v=4)](https://github.com/KiloBravoBFE "KiloBravoBFE (15 commits)")[![h1treX](https://avatars.githubusercontent.com/u/70530211?v=4)](https://github.com/h1treX "h1treX (13 commits)")[![Sheigutn](https://avatars.githubusercontent.com/u/5239767?v=4)](https://github.com/Sheigutn "Sheigutn (12 commits)")[![jonaes](https://avatars.githubusercontent.com/u/36273569?v=4)](https://github.com/jonaes "jonaes (8 commits)")[![jeyemwey](https://avatars.githubusercontent.com/u/2796271?v=4)](https://github.com/jeyemwey "jeyemwey (8 commits)")[![techtoto](https://avatars.githubusercontent.com/u/71986996?v=4)](https://github.com/techtoto "techtoto (8 commits)")[![TheOneWithTheBraid](https://avatars.githubusercontent.com/u/29313398?v=4)](https://github.com/TheOneWithTheBraid "TheOneWithTheBraid (7 commits)")[![Aidaprima](https://avatars.githubusercontent.com/u/153545095?v=4)](https://github.com/Aidaprima "Aidaprima (7 commits)")[![clyaIO](https://avatars.githubusercontent.com/u/52716424?v=4)](https://github.com/clyaIO "clyaIO (7 commits)")[![feuer1998](https://avatars.githubusercontent.com/u/100516041?v=4)](https://github.com/feuer1998 "feuer1998 (6 commits)")[![jonasr97](https://avatars.githubusercontent.com/u/76997664?v=4)](https://github.com/jonasr97 "jonasr97 (6 commits)")[![marhei](https://avatars.githubusercontent.com/u/10304183?v=4)](https://github.com/marhei "marhei (5 commits)")

### Embed Badge

![Health badge](/badges/traewelling-line-colors/health.svg)

```
[![Health](https://phpackages.com/badges/traewelling-line-colors/health.svg)](https://phpackages.com/packages/traewelling-line-colors)
```

###  Alternatives

[akrabat/akrabat-session

A Zend Framework 2 module for configuring sessions

134.5k](/packages/akrabat-akrabat-session)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
