Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://49093]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2017-03-25 12:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (311 votes). Check out past polls.