Theres a little bug. If you hold down the space key it will continue to randomly choose the values until you let go.
Heres my crack at it, just basically your code with some additions
SYNC ON : SYNC RATE 30
HIDE MOUSE : BACKDROP ON
DO
r = RND(255) : b = RND(255) : g = RND(255)
TEXT 0, 0, "Press Space to Stop" : TEXT 0, 15, "Red: " + STR$(r) : TEXT 0, 30, "Green: " + STR$(g) : TEXT 0, 45, "Blue: " + STR$(b)
TEXT 0, 75, "Last Colors" : TEXT 0, 90, "Old Red: " + STR$(oldR) : TEXT 0, 105, "Old Green: " + STR$(oldG) : TEXT 0, 120, "Old Blue: " + STR$(oldB)
IF SPACEKEY()
COLOR BACKDROP RGB(r,g,b) : oldR = r : oldG = g : oldB = b
DO
TEXT 0, 0, "Red: " + STR$(r) : TEXT 0, 15, "Green: " + STR$(g) : TEXT 0, 30, "Blue: " + STR$(b)
IF SPACEKEY() = 0 THEN EXIT
SYNC
LOOP
ENDIF
SYNC : CLS
LOOP
Online Flash Games and Guides .::. http://www.gamestack.org
Online Notebook .::. http://onlinenotes.gamestack.org