You could use a color picker with an HTML form, like:
PHP Code:
$document->add(new Comment("<form action='PAGENAME' method='post'>
<input type='color' id='color' name='color' value='#e66465' />
<button id='submit' value='submit' name='submit type='submit'>Pick Color!</button>
</form>"));
Replace PAGENAME with the whatever page you use this on. If used in blankview.php for example, you would replace it with "blank".
To get the data from the form, use this:
PHP Code:
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$mycolor = $_REQUEST['color'];
$document->add(new Comment("The color you picked was {$mycolor}!"));
//a database statement could also go here if you want to store the chosen color
return;
}
That's just getting the color though. I'm not entirely sure how to apply the chosen color to pets.