function _hexToPHPColor($hex)
    {
        $length = strlen($hex);
        $dr = hexdec(substr($hex, $length - 6, 2));
        $dg = hexdec(substr($hex, $length - 4, 2));
        $db = hexdec(substr($hex, $length - 2, 2));
        $color = ($dr << 16) + ($dg << 8) + $db;
        return $color;
    }