For fun, I created a table of colours. They're not as distinctive as I would have imagined. Maybe something more logarithmic (00,BB,FF instead of 00,80,FF, for example) would work better

use strict; use warnings; # # Gives (1 + 2^n)^3 - 1 colours, where n>=0 # # $n = 0 gives 7 colours. # $n = 1 gives 26 colours. # $n = 2 gives 728 colours. # my $n = 1; my @components; my @colours; { #my $inc = 256 / (1 << $n); my $inc = 256 >> $n; my $component = 0; do { push(@components, sprintf('%02X', $component)); $component += $inc; } while ($component < 256); push(@components, 'FF') unless ($components[$#components] eq 'FF'); } { my $r; my $g; my $b; foreach $r (@components) { foreach $g (@components) { foreach $b (@components) { push(@colours, "#$r$g$b"); }}} shift(@colours); # Remove background colour. } print(qq{<table bgcolor="#000000"><tr><td>\n}); print(qq{<font color="$_">This is a line of text in $_.</font><br>\n}) + foreach (@colours); print(qq{</td></tr></table>\n}); __END__ output: =======
This is a line of text in #000080.
This is a line of text in #0000FF.
This is a line of text in #008000.
This is a line of text in #008080.
This is a line of text in #0080FF.
This is a line of text in #00FF00.
This is a line of text in #00FF80.
This is a line of text in #00FFFF.
This is a line of text in #800000.
This is a line of text in #800080.
This is a line of text in #8000FF.
This is a line of text in #808000.
This is a line of text in #808080.
This is a line of text in #8080FF.
This is a line of text in #80FF00.
This is a line of text in #80FF80.
This is a line of text in #80FFFF.
This is a line of text in #FF0000.
This is a line of text in #FF0080.
This is a line of text in #FF00FF.
This is a line of text in #FF8000.
This is a line of text in #FF8080.
This is a line of text in #FF80FF.
This is a line of text in #FFFF00.
This is a line of text in #FFFF80.
This is a line of text in #FFFFFF.

Update: s/80/BB/g

This is a line of text in #0000BB.
This is a line of text in #0000FF.
This is a line of text in #00BB00.
This is a line of text in #00BBBB.
This is a line of text in #00BBFF.
This is a line of text in #00FF00.
This is a line of text in #00FFBB.
This is a line of text in #00FFFF.
This is a line of text in #BB0000.
This is a line of text in #BB00BB.
This is a line of text in #BB00FF.
This is a line of text in #BBBB00.
This is a line of text in #BBBBBB.
This is a line of text in #BBBBFF.
This is a line of text in #BBFF00.
This is a line of text in #BBFFBB.
This is a line of text in #BBFFFF.
This is a line of text in #FF0000.
This is a line of text in #FF00BB.
This is a line of text in #FF00FF.
This is a line of text in #FFBB00.
This is a line of text in #FFBBBB.
This is a line of text in #FFBBFF.
This is a line of text in #FFFF00.
This is a line of text in #FFFFBB.
This is a line of text in #FFFFFF.

In reply to 26 difference colours... by ikegami
in thread Coloring IRC logs nicely by iblech

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.