コード例 #1
0
ファイル: FunctionRegistry.php プロジェクト: poef/ariadne
 /**
  * Returns the 'value' channel of @color in the HSV space
  *
  * @param ILess_Node_Color $color
  * @return string
  */
 public function hsvvalue(ILess_Node $color)
 {
     if (!$color instanceof ILess_Node_Color) {
         return $color;
     }
     $hsv = $color->toHSV();
     return new ILess_Node_Dimension(ILess_Math::round($hsv['v'] * 100), '%');
 }