[KLUG Programming] HTML colors in PHP array

Wesley Leonard programming@kalamazoolinux.org
Tue, 07 Oct 2003 23:24:05 -0400


This is just too good not to share.

I created an array with all the HTML color names and hex codes tonight. 
Here's a snippet:

$html_colors = array (
    'Aliceblue' => "F0F8FF",
    'Antiquewhite' => "FAEBD7",
    'Aqua' => "00FFFF",
    'Aquamarine' => "7FFFD4",
    ....
);

Thank you htmlgoodies.com, copy/paste, and regex in vim...

I expect to use this a LOT in my various projects.

Since it's a waste of bandwidth to attach a file and the thing is too
long to paste into an email, if you want a copy just shoot me a private
email and I'll send it to you.

happy programming!
--
Wesley Leonard