Huw Davies : riched20: Move text color determination to a helper function.