I think see what you're trying to do. Say you had an item's id passed through $_POST
$colours = array(1 => 'EE0000', 2 => 'E3CF57', 3 => '6E8B3D', 4 => '00688B', 5 => '8968CD');
$item_id = preg_replace("/[^\d\]/", "", $_POST['id']); // remove everything that's not a number
$sql = "SELECT `item_name`, `item_colour` FROM item_table WHERE item_id = '". $item_id ."'";
$run = mysql_query($sql);
$row = mysql_fetch_assoc($run);
$selected_colour = $row['item_colour'];
$selected_name = $row['item_name'];
/*
Say the field item_colour is a number from 1 to 5 depending on what colour you want it to be. You would then use the field to act as the means of selecting the array key from $colours
*/
echo '<p style="color: #'. $colours[$selected_colour] .';">'. $selected_name .'</p>';
So if the query came back as 3 for item_colour the above would be the same as saying:
<p style="color: #'. $colours[3] .';">'. $selected_name .'</p>
Which would make the page's html be:
<p style="color: #6E8B3D;">ITEM NAME</p>
Hope that helps.