I want to have a button that has numbers in the range 0 ... 255. I'd like the color of the button to be white when it's zero and blue (RGB = (0,0,255)) when it is 255. How can I accomplish this? At first I tried to make it RGB = (0,0,0) in the beginning, but it will only make it black.
How can I accomplish this?
Simple linear interpolation between white (255,255,255) and blue (0,0,255) will do.
A gradient from blue to white would start with:
0,0,255
with values of the R and G increasing at the same rate: 1,1,255 ... 10,10,255 ... 255,255,255
The colors between the 2 will start to appear pastel blue, then greyish blue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With