-
-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ENH] Drivers colors #480
Comments
Discussion is at #218 |
Yes, this is a long-standing issue. But not that easy to solve, as you notice, when reading the other discussion. I hope to get this fixed for next season. But there won't be any noticeable progress before that. |
Hi, I have read the discussion and tried to generate different colors by changing the lightness, but it was not successful. I am thinking that we can use the TeamColor in the DriverList for the teams. I have found a list of 20 simple colors that enables easy contrasting. We can assign a color for each driver, however the driver's color will vary in every session, and it might seem strange to see HAM in red and VER in orange... It solves the year-color problems, prevents similar colors, and eliminates the need to add colors manually when a new driver joins a session Let me know your thoughts about it |
I feel that defeats the purpose of providing driver colors. They are given in the plotting module for consistency. Also in this case each driver is strongly associated with their team color, I doubt many user will use the new color mapping if that association is not guarenteed |
@manpean I agree with @Casper-Guo. That's not a solution most people are interested in. |
Hi again, I have been testing a new code. The team's colors are converted from hex to CIELab. For each team color, the code searches for a color that fulfills three conditions: The Delta_E between the color and other team colors must be higher than 'diff'. It is not efficient; it has three nested 'for' loops, and each loop iterates 256 times, resulting in 16,777,216 possible colors. I attach the code, maybe you can find a better way to do it.
|
@Casper-Guo I have read an article that explains how the difference between colors are measured using Delta E The code I attached uses Delta E 1976, it means that Delta E is the lenght of the vector that starts in color 1 and ends in color 2 in a 3D space. |
As of v3.4.0 and #585 driver specific colours are now deprecated and the whole |
Proposed new feature or change:
Hi,
When I run the example
plot_position_changes
and change the year to 2022. It fails due to thecolor = fastf1.plotting.driver_color(abb)
being set up only for the current year, and there are no colors for VET, MSC,...I have solved the issue with:
However, I am encountering an issue where ALO, VET, and STR have Aston Martin colors, and ALO should have Alpine colors.
Do you consider improving the driver color dictionary? Maybe the data can be imported from an API to obtain the exact color for each race.
Same issues could happen in the future if a similar thing occurs to:
The text was updated successfully, but these errors were encountered: