add led_color_to_brightness function