how to dim rgb leds to maintain correct color


I would like to dim a set of leds (WS2811s) while using the RGB color specification. I noticed that that multiplying each RGB value by the same dimming factor ( <1 ) results in the color changing as it is dimmed. Is there a more accurate way to dim RGB leds to maintain the correct color?



Depending on whatever library or code you're using, you may want to look into using HSV instead of RGB.