Code to generate hexadecimal values of all colors
Hi guys I need to generate a list of all possible 16 million colors in the 6 digit hexadecimal notation - how can that be done, I would appreciate a formula for that. I'm building the scrip开发者_StackOverflow社区t in php here.
Just print all values from 0 to 2^24 and format it as hex with 6 digits...
long max = pow(2,24);
for(long i = 0; i < max; i++)
{
printf("%6x\n", i);
}
Something like that?
for i = 0 to 16 million
print i as hexa
精彩评论