Ah, thank you very much for pointing that out!
I also had to do something like this for my Python project and ended up with this: '#000' if int(my_color, 16) > 0xffffff/2 else '#fff' This approach isn't perfect, but it does the job.
Ah, thank you very much for pointing that out!
I also had to do something like this for my Python project and ended up with this: '#000' if int(my_color, 16) > 0xffffff/2 else '#fff' This approach isn't perfect, but it does the job.