Advertisement
Guest User

Untitled

a guest
May 29th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. static string getRandomColor()
  2. {
  3. Random random = new Random();
  4.  
  5. int firstRandomColor = 0;
  6. int secondRandomColor = 0;
  7. int thirdRandomColor = 0;
  8.  
  9. firstRandomColor = random.Next(0, 255);
  10. secondRandomColor = random.Next(0, 255);
  11. thirdRandomColor = random.Next(0, 255);
  12.  
  13. string rgba = "";
  14. rgba = "'rgba(" + firstRandomColor + "," + secondRandomColor + "," + thirdRandomColor + ",0.7)'";
  15. return rgba;
  16. }
  17.  
  18. string randomColor1 = getRandomColor();
  19. string randomColor2 = getRandomColor();
  20. string randomColor3 = getRandomColor();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement