How to convert hexadecimal color value to RGB value in php

Most of the CMS provides a color picker in admin panel to user to choose a color. And almost all of the color pickers return the color code as hexadecimal mode, e.g. #4EE4D3. So, you can just get the value and set the color in css. For example: [php] body{ background: } [/php] This is a very good practice. Problem occurs if you want to put a opacity option to the user. You can set background opacity with hexadecimal color value. You must use RGBA filter, so RGB color mode as well. Like: [css] body{ background: rgba(233, 122, 234, 0.7); […]

Continue Reading

You may also like