DRY up color getters using preprocessor macro