Do you know where your variables are? | |
PerlMonks |
Re: Generating Visually Distinct Colorsby iblech (Friar) |
on Mar 23, 2005 at 13:39 UTC ( [id://441758]=note: print w/replies, xml ) | Need Help?? |
japhy, you might find Coloring IRC logs nicely interesting, too. This is the algorithm my IRC bot iblechbot uses, too (screenshot). First, a raw IRC log is read to find out which nicks were online (and talked) at the same time. This information is used to build a interference graph. Then, using the graph, all nicks get distict colors. Because of the interference graph, the colors used are reduced to a minimum:
Using the colornum/total_num_of_colors information, the actual color pair (foreground, background) is built:
In Section
Cool Uses for Perl
|
|