I know this is possible duplicated question. Ruby, Generate a random hex color
My question is slightly different. I need to know, how to generate the random hex lig
All colors where each of r, g ,b is greater than 0x7f
color = (0..2).map{"%0x" % (rand * 0x80 + 0x80)}.join