I’m putting in a function which will allow a user to input a color (eg: purple) and it will change the look of their profile to be purple. It’s interpreted from text into a ‘Color’ class which stores them inside itself as RGB numbers (int for red, one for green and other for blue). What i don’t know how to do is logically turn these three numbers into another 3 which will make a readable colour.
Can anyone help me on how to do this?
Joe
If I’m interpreting your question correctly, you’re looking for a readable text color after someone has chosen a background theme color. This was answered in an older question:
Good text foreground color for a given background color