Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Random Color Generator

by shibu_pu (Acolyte)
on Jun 06, 2013 at 11:17 UTC ( [id://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 (Cardinal) 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?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-20 04:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found