asHex() 공개 메소드

public asHex ( $inc_hash = TRUE )
예제 #1
0
 /**
  * returns an IE hex string for a color with an alpha channel
  * suitable for passing to IE filters.
  */
 public static function ie_hex_str($color)
 {
     if (!$color instanceof SassColour) {
         $color = new SassColour($color);
     }
     $alpha = str_replace(',', '.', round($color->alpha * 255));
     $alpha_str = str_pad(dechex($alpha), 2, '0', STR_PAD_LEFT);
     $col = $color->asHex(FALSE);
     return new SassString(strtoupper('#' . $alpha_str . $col));
 }