1 call to CSSmin::rgbToHex()
CSSmin::hslToHex dans advagg_css_compress/yui/CSSMin.inc

Fichier

advagg_css_compress/yui/CSSMin.inc, line 1011

Classe

CSSmin

Code

private function rgbToHex($matches) {
    $hexColors = array();
    $rgbColors = explode(',', $matches[1]);
    // Values outside the sRGB color space should be clipped (0-255)
    for ($i = 0, $l = count($rgbColors); $i < $l; $i++) {
        $hexColors[$i] = sprintf("%02x", $this->clampNumberSrgb($this->rgbPercentageToRgbInteger($rgbColors[$i])));
    }
    // Fix for issue #2528093
    if (!preg_match('/[\\s,);}]/', $matches[2])) {
        $matches[2] = ' ' . $matches[2];
    }
    return '#' . implode('', $hexColors) . $matches[2];
}