get_driver_color_mapping#
- fastf1.plotting.get_driver_color_mapping(session, *, colormap='default')[source]#
Returns a dictionary that maps driver abbreviations to their associated colors. The colors are given as hexadecimal RGB color codes.
- Parameters:
session (
Session) – the session for which the data should be obtainedcolormap (
str) – one of'default','fastf1'or'official'. The default colormap is'fastf1'. Useset_default_colormap()to change it.
- Return type:
dict[str,str]- Returns:
dictionary mapping driver abbreviations to RGB hex colors