Generating a readable colour from RGB?

Posted by Joe Simpson on Stack Overflow See other posts from Stack Overflow or by Joe Simpson
Published on 2010-06-02T19:22:19Z Indexed on 2010/06/02 19:24 UTC
Read the original article Hit count: 336

Filed under:
|

Hi, 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

© Stack Overflow or respective owner

Related posts about rgb

Related posts about colour