I want to fill up a seekbar
with 256 colors, that means 8 bit color ( RRRGGGBB ).That means I will have only 4 colors of blue and 8 colors of red and green and then make combinations between them.
if (progress < 256) {
b = progress;
} else if (progress < 256 * 2) {
g = progress % 256;
b = 256 - progress % 256;
} else if (progress < 256 * 3) {
g = 255;
b = progress % 256;
} else if (progress < 256 * 4) {
r = progress % 256;
g = 256 - progress % 256;
b = 256 - progress % 256;
} else if (progress < 256 * 5) {
r = 255;
g = 0;
b = progress % 256;
} else if (progress < 256 * 6) {
r = 255;
g = progress % 256;
b = 256 - progress % 256;
} else if (progress < 256 * 7) {
r = 255;
g = 255;
b = progress % 256;
}
This code is for normal color picker, but I need only 255 colors combined, how can I make the changes ? I am out of ideeas and I don't really need black in the color picker.