Convert Hex Color Format To RGB in PHP

Convert Hex Color Format (#FFFFFF) to RGB

function hs_hex_to_rgb($hex)
{
    list($r, $g, $b) = sscanf($hex, "#%02x%02x%02x");
    return array($r, $g, $b);
}
Shopping Cart