Use tables instead of strings for colours

This way we don't need to unassemble and reassemble strings in convertindex.