PHP Convert RGB from/to HTML hex color

      Comments Off on PHP Convert RGB from/to HTML hex color

p. anyexample.com, a site that I can’t honestly say I’ve ever visited before, has just posted a good tutorial on “PHP Convert RGB from/to HTML hex color”:http://www.anyexample.com/programming/php/php_convert_rgb_from_to_html_hex_color.xml.

p. Ok, calling tis a tutorial is really incorrect, this is a web page with nicely formatted code and a few words of introduction to each function. It’s long on the “HOW” but give it up if you are looking for the “WHY”. Here’s the description the unnamed author gives this article.

bq. This article provides two functions for converting HTML color (like #AAED43) to three RGB values ($r = 170, $g = 237, $b = 67) and converting RGB values to HTML color.

p. The author lays out the two conversation functions and then gives a sample piece of HTML/PHP/CSS that uses them. It’s spartan but if you understand PHP, it’s clear enough.

p. =C=