Update: slightly improved example

This isn't the place for job offers, it's to get you to learn. Here is a Tk code snippet that gives you a quick start. One big problem, is that on X11, color names are defined in your rgb.txt file, which is usually in /usr/X11/lib/rgb.txt. My script below removed/changed your colors to accomodate the rgb.txt list. Now you can specify colors exactly like #ae55d916d916 , so you can use the Tk color selector widget, to get the exact rgb names for your colors like terracotta, etc.

#!/usr/bin/perl use Tk; use strict; my $x=0; my $y=0; my @backgrounds = qw/lightsteelblue red grey20 gold grey ivory lavend +er green grey25 brown pink skyblue tan/; my @accents = qw/lightsteelblue red black darkred yellow chocolat +e grey25 gold grey ivory lavender green grey60 white pink brown skybl +ue tan violet/; my @focuses = qw/black darkred chocolate violet/; my %nums; my $count = 0; for my $background (@backgrounds) { for my $accent (@accents) { for my $focus (@focuses) { #print "$background $accent $focus\n" unless $accent eq $focus; $nums{$count} = [ $background, $accent, $focus] unless $accent e +q $focus; $count++; } } } #print keys %nums; my $mw=tkinit; $mw->minsize(qw(500 500)); $mw->fontCreate('big', -family=>'arial', -weight=>'bold', -size=>int(-18*18/14)); my $c = $mw->Scrolled('Canvas')->pack(-expand=>1,-fill=>'both'); $count = 0; for (0..scalar keys %nums) { my $item=$c->createRectangle($x-200,$y,$x+200,$y+25, -fill=> ${$nums{$_}}[0], -outline => ${$nums{$_}}[2], -width=> 5, ); my $text = $c->createText($x+10,$y+10, -anchor=>'center', -fill => ${$nums{$_}}[1], -text => ${$nums{$_}}[0].'-'.${$nums{$_}}[1].'-'.${$nums{$_}}[2 +], -font => 'big', ); $y+=40; } $c->configure(-scrollregion => [$c->bbox('all')] ); $mw->Button( -text => "Save", -command => [sub { $c->update; my @capture=(); my ($x0,$y0,$x1,$y1)=$c->bbox('all'); @capture=('-x'=>$x0,'-y'=>$y0,-height=>$y1-$y0,-width=>$x1-$x +0); $c -> postscript(-colormode=>'color', -file=>$0.'.ps', -rotate=>90, -width=>800, -height=>500, @capture); } ] )->pack; MainLoop;

I'm not really a human, but I play one on earth. Cogito ergo sum a bum

In reply to Re: Colour Combinations - Interested? by zentara
in thread Colour Combinations - Interested? by Bard Judith

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.