-
Notifications
You must be signed in to change notification settings - Fork 18
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
Make contrast of all player colors the same #17
base: master
Are you sure you want to change the base?
Conversation
the diff is a bit inflated due to automated formatting, sorry about that |
This game currently suffers the problem that some player colors appear much darker to the human eye than others. Especially when using a projector the dark blue player is especially hard to recognize. This is both an accessibility problem and creates unfairness since some players are more well hidden than others. This PR improves the issue by generating the player colors using the HSLuv color space. This causes all colors to appear roughly at the same brightness to humans. Signed-off-by: Tobias Guggenmos <[email protected]>
af68321
to
3162c44
Compare
cleaned up the diff now for easier merging and review |
I'm a bit torn about this. I agree there are problems with the dark blue and violet player visibility. However, at least for me, it is much harder to tell which dot is which player in the hsluv case. I also very much like the rainbow effect of the player list. I get what you are trying to do with the color distribution, and agree that it is the better solution if optimizing for different colors for low player counts. I still prefer the original solution for aesthetic reasons. (I also think it has a bug as is, for 6 players the resulting multiplier is 4, so player 4 has offset 3 * 360 / 6 * 4 = 720 -> same color as player 1). I would still merge this if you make it a config option and remove the distribution changes. config.c is a bit janky, but easy enough to work with. Make it default to 1, nobody is checking new options with default 0. I just need a way back for people who prefer the old colors (or may even need them for e.g. hardware controllers). |
Thanks for the Feedback!
Yes, that is indeed not ideal.
Oops, thanks for pointing out the math error. I agree that the rainbow is nice and it might be better to keep it.
I don't really like the idea of making it an optional config option, since the goal of the PR was to solve the contrast problems for all players. I also agree that the current state of the PR might be not good enough as a default. As an alternative, I'd propose to ditch the automatic color generation and instead hard code a list of 12 hand curated colors (more players aren't possible anyway). That list should fulfill the following requirements:
If you like that idea I can work on an PR for it. |
This game currently suffers the problem that some player colors appear much darker to the human eye than others. Especially when using a projector the dark blue player is especially hard to recognize. This is both an accessibility problem and creates unfairness since some players are more well hidden than others.
This PR improves the issue by generating the player colors using the HSLuv color space. This causes all colors to appear roughly at the same brightness to humans.
Before:
![Screenshot from 2023-11-17 15-37-38](https://private-user-images.githubusercontent.com/15368509/283929779-55fb4c50-0978-4276-beaa-d9719757a884.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1ODkyODMsIm5iZiI6MTczOTU4ODk4MywicGF0aCI6Ii8xNTM2ODUwOS8yODM5Mjk3NzktNTVmYjRjNTAtMDk3OC00Mjc2LWJlYWEtZDk3MTk3NTdhODg0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDAzMDk0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFkMGZjOTIxNDFiMDMxNDUyMDNhMzM0NDM4OTYzMjI2ZTgwNDUxOTJkMTc1MGQ5OWI2OGNjYmE2NzQ1M2NlMTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.6g_BOeJ19UPWM4TvLOc93jhJZ1nyfLsTJnH5bHHg-Kw)
After:
![Screenshot from 2023-11-17 15-34-54](https://private-user-images.githubusercontent.com/15368509/283929711-86d40c23-0cf5-4c7a-b151-c978c6f36e8c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1ODkyODMsIm5iZiI6MTczOTU4ODk4MywicGF0aCI6Ii8xNTM2ODUwOS8yODM5Mjk3MTEtODZkNDBjMjMtMGNmNS00YzdhLWIxNTEtYzk3OGM2ZjM2ZThjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDAzMDk0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg0NDlmMTM4N2VhODExZDE4MDRlMTU2NWM0OGJlOGFlNzEwMjU5MTFlMjM4NzM5ZTc4ZGQ3M2I1ZmE5ODJmYzAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.tYQ2kd7_2L8c6B4EFpDLmyl6_erh0AmwAqfELPk3ACE)