How can I get the colours for each line?

Hello! I’m wondering which API can tell me the colour for each line (red for buses, blue for Piccadilly tube line, green for trams, etc).

Can you help me with this thing?

Thank you in advance.

Greetings!

Welcome @GrupoDO

The colours are defined in https://content.tfl.gov.uk/tfl-line-diagram-standard.pdf

.overground {
    background: #EF7B10;
    color: white
}

.london-overground {
    background: #EF7B10;
    color: white
}

.piccadilly {
    background: #0019A8;
    color: white
}

.bakerloo {
    background: #B26313;
    color: #fff
}

.central {
    background: #DC241F;
    color: white
}

.circle {
    background: #FFD329;
    color: #0019A8
}

.district {
    background: #007D32;
    color: white
}

.hammersmith,
.hammersmithcity,
.hammersmithandcity {
    background: #F4A9BE;
    color: #0019A8
}

.jubilee {
    background: #A1A5A7;
    color: white
}

.metropolitan {
    background: #9B0058;
    color: white
}

.northern {
    background: #000;
    color: #fff
}

.victoria {
    background: #0098D8;
    color: white
}

.waterlooandcity {
    background: #93CEBA;
    color: #0019A8
}

.tflrail {
    background: #0019A8;
    color: white
}

.dlr {
    background: #00AFAD;
    color: white
}

.tram {
    background: #00BD19
}

.londontrams {
    background: #00BD19;
    color: white
}

The Liz line colour (#6950a1) is in https://content.tfl.gov.uk/elizabeth-line-design-idiom.pdf

1 Like

Hello @briantist! Thank you for the information about the line colours!

2 Likes