I'm using a potentiometer that outputs a value 0-255. What I want it to do is change the color of an RGB LED in a way that contains 256 steps which will show all colors on the LED with as much precision you can get.
Question: How would I convert that single value (0-255) to an rgb code that I can apply to the LED?
The most obvious solution is to create a dictionary with all 256 possible values and manually assing RGB codes to those values. I don't want to do this and I'm trying to find a more mathematical solution.