A user can change the default design of their site by selecting a color. This color is applied to the color of the menu background. The problem is that I have to change the color of the menu text according to the selected color (for example, if the user chooses dark green, the color of the text should be white).
I only want to use white or black as the text color for the menu and know how to calculate if white or black allows better readability.
The website is for sports teams. As teams often have specific colors, I want to give them the opportunity to add team colors to the site. the models will not work because I can not provide all the colors with the models. I've also chosen not to give them the ability to set the color of the text because I think it's a physics problem (contrast)
And is this the same phenomenon we see when colors appear less saturated in the middle of the day compared to dawn and dusk (when the contrast of brightness is reduced)?