I have a repeater which will contain an image and text, I want to apply a custom colour to an element in each repeater using the color picker. I'm not sure the best way to specify an individual css name for each repeater, can it be automated in some way? In my code below i'm using the colour picker and some inline css, but in this example each repeater item would have the same colour.
I want to make each one different.
<?php
foreach($page->repeater as $p) {
echo "<style>.repeatColor {background-color: #{$p->colour_picker};}</style>";
echo "<div class='repeatColor'></div>";
}
?>