Hex Code Brightness PHP?
        Posted  
        
            by Juddling
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Juddling
        
        
        
        Published on 2010-06-10T14:05:28Z
        Indexed on 
            2010/06/10
            14:22 UTC
        
        
        Read the original article
        Hit count: 437
        
I want users on my website to be able to pick a hex colour, and I just want to display white text for dark colours and black text for light colours. Can you work out the brightness from a hex code (preferably PHP)?
© Stack Overflow or respective owner