Example #1
0
  <pre>
RandomColor::one(array('format'=>'hex'));
  <?php 
echo '<span style="color:' . RandomColor::hsv2hex($c) . ';">// "' . RandomColor::hsv2hex($c) . '"</span>';
?>


RandomColor::one(array('format'=>'hsv'));
  <?php 
echo '<span style="color:' . RandomColor::hsv2hex($c) . ';">// ' . preg_replace('/\\s+|,\\s+(\\))/', '$1', var_export($c, true)) . '</span>';
?>


RandomColor::one(array('format'=>'hsl'));
  <?php 
echo '<span style="color:' . RandomColor::hsv2hex($c) . ';">// ' . preg_replace('/\\s+|,\\s+(\\))/', '$1', var_export(RandomColor::hsv2hsl($c), true)) . '</span>';
?>


RandomColor::one(array('format'=>'rgb'));
  <?php 
echo '<span style="color:' . RandomColor::hsv2hex($c) . ';">// ' . preg_replace('/\\s+|,\\s+(\\))/', '$1', var_export(RandomColor::hsv2rgb($c), true)) . '</span>';
?>


RandomColor::one(array('format'=>'hslCss'));
  <?php 
echo '<span style="color:' . RandomColor::hsv2hex($c) . ';">// "' . RandomColor::format($c, 'hslCss') . '"</span>';
?>