and like us on FB

The following PHP function will return an inverse HEX color with PHP. It’s handy if you need to print readable text on a colored background. It’s not always aesthetically pleasing so it’s usually best to use a black, neutral, or white text overlay on a background based on the background color’s numeric value.

Other color functions can be found on our blog by way of the color Tag: color tag.

Shortt URL for this post: