Click here to Skip to main content
15,905,316 members
Articles / Programming Languages / C#

Random Color Generator

Rate me:
Please Sign up or sign in to vote.
4.50/5 (2 votes)
15 Sep 2011CPOL 22.2K  
Easy HTML random color generator code (in C++):srand (time(NULL));TCHAR rand_color[10];wsprintf (rand_color, L"#%02x%02x%02x", rand()%255, rand()%255, rand()%255);//rand_color is now a random html color code in text

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions