I'm generating random RGB values
int r = rand.nextInt(255); // [0,255]
int g = rand.nextInt(255); // [0,255]
int b = rand.nextInt(255); // [0,255]
How can I convert these integers into another value (maybe int or hex?) so I can set a view's background color like so
int color = getColor(r,g,b);
myView.setBackgroundColor(color);
What might the getColor()
method looks like?