Code archives/Graphics/RC()
This code has been declared by its author to be Public Domain code.
Download source code
| |||||
For me, it's annoying to have to type in Color Rand(255),Rand(255),Rand(255), so I made a dumb function that makes it easier. (RC stands for random color) Now all you have to type is Color RC(),RC(),RC()! It's a good idea to use SeedRnd Millisecs() first though. | |||||
Function RC() Local randcolor=Rand(255) Return randcolor End Function ;Note that I haven't tested it o.O |
Comments
| ||
ummm.... if you really *have* to wrap Rand(255) in a function for setting random colour, why not just do this: Function RandomCol() Color Rand(255),Rand(255),Rand(255) End Function ? (Not that I see it being useful enough for me to functionalize) |
| ||
Didn't think about that... *slaps head in disgust* |
| ||
Not that I see it being useful enough for me to functionalize It is for me; I already did that with the Ghz library. It basically comes down to me just being lazy, and wanting to save myself every possible keystroke. o_____o As an addition to this topic, I did also create some GhzLib entries that can store individual colors for later use & recall them at any time. Wee. ¬_¬ |
Code Archives Forum