Advertisement
Jousway

light colours

Apr 3rd, 2013
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. local red = math.random(0,100)/100;
  2. local blue = math.random(0,100)/100;
  3. local green = math.random(0,100)/100;
  4.  
  5. if red > green then
  6.     if red > blue then
  7.         if blue > green then
  8.             green = 0;
  9.         else
  10.             blue = 0;
  11.         end;
  12.     end;
  13. end;
  14.  
  15. if green > red then
  16.     if green > blue then
  17.         if blue > red then
  18.             red = 0;
  19.         else
  20.             blue = 0;
  21.         end;
  22.     end;
  23. end;
  24.  
  25. if blue > red then
  26.     if blue > green then
  27.         if green > red then
  28.             red = 0;
  29.         else
  30.             green = 0;
  31.         end;
  32.     end;
  33. end;
  34.  
  35. return Def.ActorFrame {
  36.     Def.Quad { 
  37.         InitCommand=cmd(stretchto,0,0,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,color(string.format("%f, %f, %f, %f", red, green, blue, "1")));   
  38.     }; 
  39. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement