I have an application where I want the user to input a value 0-255

I have an application where I want the user to input a value 0-255 and have that translate to an RGB value. Is there a good way to have this range convert to a standard 256 color? I really thought this should be easy, but I’m going mad trying to come up with something

I’d say use the user’s inputed value from 0-255 as the Hue in an HSV value - for example:

leds[0] = CHSV(user_value, 255, 255);

That will cycle you around the color wheel as the user chooses values from 0-255 (while keeping brightness and saturation maximized).

Yeah, the simplest way it what Daniel said above. Take that value as the hue and pass it to HSV. Otherwise you’re going to have to be dealing with individual colors of R, G, and B.

This is by far the easiest way to build remotes for LEDs, create a slider that sets the color via that hue. Other sliders can then be used for saturation and value (brightness).