In a project I needed color codes which were inserted in hex code and i needed to make different shades of this color so I needed a HEX to RGBA converter in PHP.

This below code highly satisfied my needs and I am sharing this with you guys.

It needed first variable as a HEX input and second as opacity.

 

 

Leave a Reply