示例#1
0
    $palette = $palette->add(new TetradicScheme($color));
}
$filtered = Palette::filterByHueRange($palette, $hueRange);
$deduplicated = Palette::filterSimilarColors($filtered, 15);
?>
<table width="100%">
    <tr>
        <th>All</th>
        <th>Only <strong><?php 
echo $hueRange;
?>
</strong> colors</th>
        <th>Without duplicates (Tolerance: 15, meaning that they have a color difference of at least 15)</th>
    </tr>
    <tr>
        <td valign="top" align="center"><?php 
echo Palette::getHtml($palette, 4);
?>
</td>
        <td valign="top" align="center"><?php 
echo Palette::getHtml($filtered, 4);
?>
</td>
        <td valign="top" align="center"><?php 
echo Palette::getHtml($deduplicated, 4);
?>
</td>
    </tr>
</table>

示例#2
0
function color_palette_get_html(PaletteInterface $palette, $columns = null, $width = null, $height = null)
{
    return Palette::getHtml($palette, $columns, $width, $height);
}
示例#3
0
文件: schemes.php 项目: talesoft/phim
echo Palette::getHtml(new TintScheme($baseColor, 4, 0.1));
?>

<h1>Shades (base->dark)</h1>
<?php 
echo Palette::getHtml(new ShadeScheme($baseColor, 4, 0.1));
?>

<h1>Monochromatic (dark->base->light)</h1>
<?php 
echo Palette::getHtml(new MonochromaticScheme($baseColor, 4, 0.1));
?>

<h1>Tones (base->desaturated)</h1>
<?php 
echo Palette::getHtml(new ToneScheme($baseColor, 4, 0.2));
?>




<h1>Named Monochromatic Scheme</h1>
<?php 
$ns = new \Phim\Color\Scheme\NamedMonochromaticScheme($baseColor, 0.1);
?>
<p>
    Darkest Shade:<br><?php 
echo color_get_html($ns->getDarkestShade());
?>
<br>
    Darker Shade:<br><?php 
示例#4
0
 public function add(PaletteInterface $palette, $prepend = false)
 {
     return Palette::merge($this, $palette, $prepend);
 }