Different team colors between the APIs and the plotting module #419
Replies: 2 comments 1 reply
-
I actually never thought about this before or compared them. The primary team color is chose by me. I use a primary color from the teams website or similar usually. Although I noticed just now that the current primary color on mercedes website is slightly different for example. Maybe it changed, I'm not sure. Using the color palette from the API would require a separate API request (with a cached result) directly in the plotting module. This could be added in the future. Although I don't see this as a very important thing to add. What exactly would be the use case for this? |
Beta Was this translation helpful? Give feedback.
-
I didn't think the colors returned by the API would change (more frequently than every year?)
Yes, it would only be a nice-to-have. For example, if you wanted to plot every team against each other the colors used in the plotting module are more visible and different, but if you need to write a driver's name using their team color, then having the colors stand out is much less important, and the colors from the API work nicer when used on text (specifically on dark backgrounds). |
Beta Was this translation helpful? Give feedback.
-
The team colors in
fastf1.plotting.TEAM_COLORS
are different from the ones returned from the API, for example:print(fastf1.plotting.team_color("Ferrari")) # "#dc0000"
print(session.get_driver("LEC").TeamColor) # "#F91536"
I think the colors returned by the API are more "pleasant", although the ones in the plotting module are more different from one another and maybe more readable when plotted together.
Is this the reason the two sources don't match? If so, would it be useful to add a parameter to the
plotting.team_color()
function so that you can choose which of the two "palettes" to use?Beta Was this translation helpful? Give feedback.
All reactions