Skip to content

Instantly share code, notes, and snippets.

@tacone
Created May 15, 2013 09:53
Show Gist options
  • Save tacone/5582871 to your computer and use it in GitHub Desktop.
Save tacone/5582871 to your computer and use it in GitHub Desktop.
Quick palette
<?php
$palette = array(
'#DE3645','#F58759','#FBE25E','#B8D246','#129A77','#9CC3AD',
'#7DA1BF','#114477','#B086B9','#FAE1CB','#CAC4AE','#989899',
'#EBAE45', '#F58343'
);
// in a cycle
$count = 0;
foreach ($answers as $a)
{
$color = $palette[ $count++ % count($palette) ];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment