Formatting grades with colour codes