Atom Feed

Convert HEX to RGB with PHP

Andreas Zettl | 2 minute read

To convert a HEX string like "#77CCAA" or "#7ca" to the RGB Version "rgb(119, 204, 170)" we first need to remove the "#" from the string. After this we need to handle the two different cases, standard and shorthand.
Read the complete article

Convert RGB to HEX with PHP

Andreas Zettl | 3 minute read

To convert an RGB string like "rgb(114, 193, 44)" to HEX we first need to get the three color values for red, green and blue out of the string, in this article we only talk about RGB strings with the integer value representation, the below sample will not work for three percentage values.
Read the complete article