Skip to content

get_driver_color_mapping not working for 2025 #720

Answered by theOehrly
noehurtado asked this question in Q&A
Discussion options

You must be logged in to vote

This code

import fastf1
import fastf1.plotting

session = fastf1.get_session(2025, 1, "FP1")
session.load(telemetry=False)

c = fastf1.plotting.get_driver_color_mapping(session)

print(c)

for me returns

{'VER': '#0600ef', 'LAW': '#0600ef', 'GAS': '#ff87bc', 'DOO': '#ff87bc', 'ANT': '#27f4d2', 'RUS': '#27f4d2', 'ALO': '#00665f', 'STR': '#00665f', 'LEC': '#e80020', 'HAM': '#e80020', 'TSU': '#fcd700', 'HAD': '#fcd700', 'ALB': '#00a0dd', 'SAI': '#00a0dd', 'HUL': '#00e700', 'BOR': '#00e700', 'OCO': '#b6babd', 'BEA': '#b6babd', 'NOR': '#ff8000', 'PIA': '#ff8000'}

which looks correct.

You are sure that you are using the latest version and didn't accidentally update a different environment? If 2…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@noehurtado
Comment options

@theOehrly
Comment options

Answer selected by noehurtado
@noehurtado
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants