Beispiel #1
0
 public static function getHtml(PaletteInterface $palette, $columns = null, $width = null, $height = null)
 {
     $html = '';
     foreach ($palette as $i => $color) {
         $html .= Color::getHtml($color, $width, $height);
         if ($columns !== null && ($i + 1) % $columns === 0) {
             $html .= '<br>';
         }
     }
     return $html;
 }
Beispiel #2
0
function color_get_html($color, $width = null, $height = null)
{
    return Color::getHtml(color_get($color), $width, $height);
}