Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Random Color Generator

by shibu_pu (Acolyte)
on Jun 06, 2013 at 11:17 UTC ( #1037440=note: print w/replies, xml ) Need Help??


in reply to Re: Random Color Generator
in thread Random Color Generator

my ($red, $green, $blue) = (int(rand(255)), int(rand(255)), int(rand(2 +55))); print qq{<div style="background-color: rgb($red, $green, $blue);"></di +v>};

Replies are listed 'Best First'.
Re^3: Random Color Generator
by choroba (Archbishop) on Jun 06, 2013 at 12:06 UTC
    Or, if you do not want to repeat yourself:
    my ($red, $green, $blue) = map int rand 255, 1 .. 3;
    لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
      A golfer, I see.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2022-05-16 09:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (62 votes). Check out past polls.

    Notices?