Skip to content

Instantly share code, notes, and snippets.

@trepmal
Created May 29, 2012 17:33
Show Gist options
  • Select an option

  • Save trepmal/2829652 to your computer and use it in GitHub Desktop.

Select an option

Save trepmal/2829652 to your computer and use it in GitHub Desktop.
Named HTML Colors
<?php
$namedcolors = array( 'AliceBlue', 'AntiqueWhite', 'Aqua', 'Aquamarine', 'Azure', 'Beige', 'Black', 'Blue', 'BlueViolet', 'Brass', 'BrightGold', 'Bronze', 'Brown', 'CadetBlue', 'Chocolate', 'Copper', 'Coral', 'Crimson', 'Cyan', 'DarkBlue', 'DarkBrown', 'DarkCyan', 'DarkGoldenRod', 'DarkGray', 'DarkGreen', 'DarkKhaki', 'DarkMagenta', 'DarkOliveGreen', 'DarkOrange', 'DarkOrchid', 'DarkPurple', 'DarkSalmon', 'DarkSlateBlue', 'DarkSlateGray', 'DarkTan', 'DarkTurquoise', 'DarkViolet', 'DarkWood', 'DimGray', 'DustyRose', 'FeldSpar', 'FireBrick', 'ForestGreen', 'Gold', 'GoldenRod', 'Gray', 'Green', 'GreenCopper', 'GreenYellow', 'HotPink', 'HunterGreen', 'IndianRed', 'Indigo', 'Ivory', 'Khaki', 'Lavender', 'LightBlue', 'LightCoral', 'LightCyan', 'LightGray', 'LightGreen', 'LightPink', 'LightSteelBlue', 'LightWood', 'Lime', 'LimeGreen', 'Magenta', 'MandarinOrange', 'Maroon', 'MediumAquaMarine', 'MediumBlue', 'MediumForestGreen', 'MediumGoldenRod', 'MediumOrchid', 'MediumSeaGreen', 'MediumSlateBlue', 'MediumSpringGreen', 'MediumTurquoise', 'MediumVioletRed', 'MediumWood', 'MidNightBlue', 'MintCream', 'MistyRose', 'NavyBlue', 'NeonBlue', 'NeonPink', 'NewMidnightBlue', 'NewTan', 'OldGold', 'Olive', 'Orange', 'OrangeRed', 'Orchid', 'PaleGoldenRod', 'PaleGreen', 'PaleTurquoise', 'Pink', 'Plum', 'PowderBlue', 'Purple', 'Quartz', 'Red', 'RichBlue', 'RoyalBlue', 'SaddleBrown', 'Salmon', 'SandyBrown', 'Scarlet', 'SeaGreen', 'Seinna', 'Silver', 'SkyBlue', 'SlateBlue', 'Snow', 'SpicyPink', 'SpringGreen', 'SteelBlue', 'SummerSky', 'Tan', 'Teal', 'Thistle', 'Tomato', 'Turquoise', 'VeryDarkBrown', 'VeryDarkGray', 'Violet', 'VioletRed', 'Wheat', 'White', 'Yellow', 'YellowGreen' );
// array_unshift( $namedcolors, 'transparent'); //add 'transparent'
// $namedcolors = array_map( 'strtolower', $namedcolors ); //make all lowercase
// echo '<pre>'. print_r($namedcolors, true) .'</pre>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment