While <?
was once a valid php opener, you should be using <?php
.
Try changing this line:
<h2>Colour Chart</h2>
<?
to
<h2>Colour Chart</h2>
<?php
That should allow the php to be read correctly.