Exemplo n.º 1
0
 /**
  * 2015-12-08
  * @return string
  */
 public function nameColorsSizeMargin()
 {
     if (!isset($this->{__METHOD__})) {
         $this->{__METHOD__} = implode('_', ['s' . df_pad0(2, $this->params()->fontSize()), 'f' . implode('-', $this->params()->fontColor()), 'b' . implode('-', $this->params()->bgColor()), 'm' . $this->params()->marginLeft()]);
     }
     return $this->{__METHOD__};
 }
Exemplo n.º 2
0
/**
 * 2015-11-29
 * @uses dechex()
 * http://php.net/manual/function.dechex.php
 * http://stackoverflow.com/a/15202156
 * @param int[] $rgb
 * @param string $prefix [optional]
 * @return string
 */
function df_rgb2hex(array $rgb, $prefix = '')
{
    return $prefix . df_pad0(6, implode(array_map('dechex', df_int($rgb))));
}