Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Keep It Simple, Stupid
 
PerlMonks  

Re: Random Color Generator

by salvadors (Pilgrim)
on Dec 31, 2000 at 16:31 UTC ( #49093=note: print w/ replies, xml ) Need Help??


in reply to Random Color Generator

That's quite a longwinded way of generating the colors array. Especially as you do exactly the same in each part of the 'if'!

I'd use something like:

my @colors = map { join "", map { sprintf "%02x", rand(255) } (0..2) } (0..63);

Tony


Comment on Re: Random Color Generator
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://49093]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2014-04-16 23:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (436 votes), past polls