Created
October 15, 2021 13:42
-
-
Save willwillis/49e76080fd009c199048c3d31d41a72d to your computer and use it in GitHub Desktop.
Revisions
-
willwillis created this gist
Oct 15, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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