I wanted to report that in:
background:<?php echo $selected_color; ?> !important; }
The !important should be removed (for obvious reasons!). I was scratching my head trying to customise this part! I only realised that this part wasn’t in a CSS file and in the PHP file direct.