RndRGB
ColourValue = RndRGB()
 
Parameters: NONE
Returns:

    ColourValue = The RGB's levels mixed into a rgb colour value
 

      The RndRGB() function will return the random RGB colour.



FACTS:


      * The RndRGB() function is short hand for ThisColour=Rgb(rnd(255),rnd(255),rnd(255))



Mini Tutorial:


      This example draws a randomly positioned message in a random RGB colour.

  
; Start of DO/LOOP
  Do
     
   ; Calc a random X pos
     X=Rnd(GetScreenWidth())
     Y=Rnd(GetScreenHeight())
     
   ; Set the Current INK colour to a Random RGB colour value
     Ink RndRGB()
     
   ; Draw a Message to the screen in the current INK colour
     CenterText X,Y,"I'm Random Colour"
     
   ; Display the Screen
     Sync
     
   ; loop back to the DO statement to keep program running
  Loop
  



 
Related Info: RGB | RgbAlphaAdd | RgbAlphaAnd | RGBAlphaBlend | RgbAlphaMult | RgbAlphaOr | RgbAlphaSub | RgbAlphaXOr | RGBFade | RGBGreyScale :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com