Skip to content

Instantly share code, notes, and snippets.

@willwillis
Created October 15, 2021 13:42
Show Gist options
  • Select an option

  • Save willwillis/49e76080fd009c199048c3d31d41a72d to your computer and use it in GitHub Desktop.

Select an option

Save willwillis/49e76080fd009c199048c3d31d41a72d to your computer and use it in GitHub Desktop.

Revisions

  1. willwillis created this gist Oct 15, 2021.
    37 changes: 37 additions & 0 deletions technicolor.pl
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,37 @@
    #/usr/bin/perl
    use strict;

    foreach my $line (<DATA>) {
    my ($name, $hex) = split(/\s+/,$line);
    print qq~<div style="background-color:$hex; display:inline; padding: 3em; float:left">$name</div>~;
    }

    __DATA__
    red #ff0000
    yellow #fff000
    green #008000
    brown #964B00
    scarlet #ff2400
    black #000000
    ochre #cc7722
    peach #ffcba4
    ruby #e0115f
    olive #808000
    violet #7F00FF
    fawn #E5AA70
    lilac #c8a2c8
    gold #ffd700
    chocolate #d2691e
    mauve #E0B0FF
    cream #FFFDD0
    crimson #DC143C
    silver #c0c0c0
    rose #ffe4e1
    azure #007fff
    lemon #FDFF00
    russet #80461B
    Grey #808080
    Purple #800080
    White #ffffff
    pink #ffc0cb
    orange #ffa500