示例#1
0
文件: umexo.php 项目: philum/cms
function ums_clr($r)
{
    $ra = array('2387d5', '2387d5', '85b933', '85b933', '8a50c8', '8a50c8', 'f2c627', 'f2c627', 'e11419', 'e11419');
    foreach ($r as $k => $v) {
        $clr = $ra[$k] ? $ra[$k] : dechex(round($v * 16000000));
        //if($k/2==round($k/2))$clr=$clr;
        $ret[$k] = hexrgb_r($clr);
    }
    return $ret;
}
示例#2
0
文件: spe.php 项目: philum/cms
function imgclr($im, $d, $a = '')
{
    $r = hexrgb_r($d);
    if ($a) {
        return imagecolorallocatealpha($im, $r[0], $r[1], $r[2], $a);
    } else {
        return imagecolorallocate($im, $r[0], $r[1], $r[2]);
    }
}
示例#3
0
文件: lib.php 项目: philum/cms
function hexrgb($d, $o = '')
{
    $r = hexrgb_r($d);
    return 'rgba(' . $r[0] . ',' . $r[1] . ',' . $r[2] . ',' . $o . ')';
}