$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>
function color_palette_get_html(PaletteInterface $palette, $columns = null, $width = null, $height = null) { return Palette::getHtml($palette, $columns, $width, $height); }
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
public function add(PaletteInterface $palette, $prepend = false) { return Palette::merge($this, $palette, $prepend); }