Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: [OT] Ordering colors

by jeffa (Bishop)
on May 05, 2015 at 19:22 UTC ( [id://1125761]=note: print w/replies, xml ) Need Help??


in reply to [OT] Ordering colors

Problem solved, but perhaps this little CGI script will be of service to you. It uses Color::Spectrum to generate a 12 cell, one row table whose cells range from the starting color to the ending color.

use strict; use warnings; use CGI; use HTML::Template; use Color::Spectrum qw(generate); my $cgi = CGI->new; my $tmpl = HTML::Template->new( filehandle => \*DATA, associate => $cg +i ); my $vars = $cgi->Vars; if ($vars->{go}) { my @colors = map { c => $_ }, generate( 12, @{$vars}{qw(start end) +} ); $tmpl->param( colors => \@colors ); } print $cgi->header, $tmpl->output; __DATA__ <form method="post"> Color 1: <input type="text" name="start" value="#" /><br /> Color 2: <input type="text" name="end" value="#" /><br /> <input type="submit" name="go" /> </form> <tmpl_if go> <table width="100%"> <tr> <tmpl_loop colors><td bgcolor="<tmpl_var c>"><tmpl_var c></td></tmpl_l +oop> </tr> </table> </tmpl_if>

You might be able to use this to generate your candidate ranges to see if they work or not.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (6)
As of 2024-04-24 11:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found