Completely re-worked RGB handling.