TeensyMud - 'A ruby mud server.'

Browse repository
back

colorcodes.rb

#
# file:: colors.rb
# author:: Jon A. Lambert
# version:: 2.8.0
# date:: 01/19/2006
#
# This source code copyright (C) 2005, 2006 by Jon A. Lambert
# All rights reserved.
#
# Released under the terms of the TeensyMUD Public License
# See LICENSE file for additional information.
#

ColorTable = {
"AliceBlue" => ["#F0F8FF" , "gray", "\e[0;37m", "\e[47m"],
"AntiqueWhite" => ["#FAEBD7" , "brown", "\e[0;33m", "\e[40m"],
"Aqua" => ["#00FFFF" , "cyan", "\e[0;36m", "\e[46m"],
"Aquamarine" => ["#7FFFD4" , "lightcyan", "\e[1;36m", "\e[46m"],
"Azure" => ["#F0FFFF" , "gray", "\e[0;37m", "\e[47m"],
"Beige" => ["#F5F5DC" , "brown", "\e[0;33m", "\e[43m"],
"Bisque" => ["#FFE4C4" , "brown", "\e[0;33m", "\e[43m"],
"Black" => ["#000000" , "black", "\e[0;30m", "\e[40m"],
"BlanchedAlmond" => ["#FFEBCD" , "brown", "\e[0;33m", "\e[43m"],
"Blue" => ["#0000FF" , "blue", "\e[0;34m", "\e[44m"],
"BlueViolet" => ["#8A2BE2" , "purple", "\e[0;35m", "\e[45m"],
"Brown" => ["#A52A2A" , "brown", "\e[0;33m", "\e[43m"],
"BurlyWood" => ["#DEB887" , "brown", "\e[0;33m", "\e[43m"],
"CadetBlue" => ["#5F9EA0" , "cyan", "\e[0;36m", "\e[46m"],
"Chartreuse" => ["#7FFF00" , "lightgreen", "\e[1;32m", "\e[42m"],
"Chocolate" => ["#D2691E" , "brown", "\e[0;33m", "\e[43m"],
"Coral" => ["#FF7F50" , "lightred", "\e[1;31m", "\e[41m"],
"CornflowerBlue" => ["#6495ED" , "lightblue", "\e[1;34m", "\e[44m"],
"Cornsilk" => ["#FFF8DC" , "gray", "\e[0;37m", "\e[47m"],
"Crimson" => ["#DC143C" , "red", "\e[0;31m", "\e[41m"],
"Cyan" => ["#00FFFF" , "lightcyan", "\e[1;36m", "\e[46m"],
"DarkBlue" => ["#00008B" , "blue", "\e[0;34m", "\e[44m"],
"DarkCyan" => ["#008B8B" , "cyan", "\e[0;36m", "\e[46m"],
"DarkGoldenRod" => ["#B8860B" , "brown", "\e[0;33m", "\e[43m"],
"DarkGray" => ["#A9A9A9" , "darkgray", "\e[1;30m", "\e[40m"],
"DarkGrey" => ["#A9A9A9" , "darkgrey", "\e[1;30m", "\e[40m"],
"DarkGreen" => ["#006400" , "green", "\e[0;32m", "\e[42m"],
"DarkKhaki" => ["#BDB76B" , "brown", "\e[0;33m", "\e[43m"],
"DarkMagenta" => ["#8B008B" , "purple", "\e[0;35m", "\e[45m"],
"DarkOliveGreen" => ["#556B2F" , "green", "\e[0;32m", "\e[42m"],
"DarkOrange" => ["#FF8C00" , "brown", "\e[0;33m", "\e[43m"],
"DarkOrchid" => ["#9932CC" , "purple", "\e[0;35m", "\e[45m"],
"DarkRed" => ["#8B0000" , "red", "\e[0;31m", "\e[41m"],
"DarkSalmon" => ["#E9967A" , "lightred", "\e[1;31m", "\e[41m"],
"DarkSeaGreen" => ["#8FBC8F" , "green", "\e[0;32m", "\e[42m"],
"DarkSlateBlue" => ["#483D8B" , "blue", "\e[0;34m", "\e[44m"],
"DarkSlateGray" => ["#2F4F4F" , "darkgray", "\e[1;30m", "\e[40m"],
"DarkSlateGrey" => ["#2F4F4F" , "darkgrey", "\e[1;30m", "\e[40m"],
"DarkTurquoise" => ["#00CED1" , "cyan", "\e[0;36m", "\e[46m"],
"DarkViolet" => ["#9400D3" , "purple", "\e[0;35m", "\e[45m"],
"DeepPink" => ["#FF1493" , "magenta", "\e[1;35m", "\e[45m"],
"DeepSkyBlue" => ["#00BFFF" , "lightblue", "\e[1;34m", "\e[44m"],
"DimGray" => ["#696969" , "darkgray", "\e[1;30m", "\e[40m"],
"DimGrey" => ["#696969" , "darkgrey", "\e[1;30m", "\e[40m"],
"DodgerBlue" => ["#1E90FF" , "blue", "\e[0;34m", "\e[44m"],
"Feldspar" => ["#D19275" , "lightred", "\e[1;31m", "\e[41m"],
"FireBrick" => ["#B22222" , "red", "\e[0;31m", "\e[41m"],
"FloralWhite" => ["#FFFAF0" , "white", "\e[1;37m", "\e[47m"],
"ForestGreen" => ["#228B22" , "green", "\e[0;32m", "\e[42m"],
"Fuchsia" => ["#FF00FF" , "magenta", "\e[1;35m", "\e[45m"],
"Gainsboro" => ["#DCDCDC" , "gray", "\e[0;37m", "\e[47m"],
"GhostWhite" => ["#F8F8FF" , "white", "\e[1;37m", "\e[47m"],
"Gold" => ["#FFD700" , "yellow", "\e[1;33m", "\e[43m"],
"GoldenRod" => ["#DAA520" , "brown", "\e[0;33m", "\e[43m"],
"Gray" => ["#808080" , "gray", "\e[0;37m", "\e[47m"],
"Grey" => ["#808080" , "grey", "\e[0;37m", "\e[47m"],
"Green" => ["#008000" , "green", "\e[0;32m", "\e[42m"],
"GreenYellow" => ["#ADFF2F" , "lightgreen", "\e[1;32m", "\e[42m"],
"HoneyDew" => ["#F0FFF0" , "white", "\e[1;37m", "\e[47m"],
"HotPink" => ["#FF69B4" , "magenta", "\e[1;35m", "\e[45m"],
"IndianRed " => ["#CD5C5C" , "red", "\e[0;31m", "\e[41m"],
"Indigo " => ["#4B0082" , "blue", "\e[0;34m", "\e[44m"],
"Ivory" => ["#FFFFF0" , "white", "\e[1;37m", "\e[47m"],
"Khaki" => ["#F0E68C" , "brown", "\e[0;33m", "\e[43m"],
"Lavender" => ["#E6E6FA" , "gray", "\e[0;37m", "\e[47m"],
"LavenderBlush" => ["#FFF0F5" , "gray", "\e[0;37m", "\e[47m"],
"LawnGreen" => ["#7CFC00" , "lightgreen", "\e[1;32m", "\e[42m"],
"LemonChiffon" => ["#FFFACD" , "yellow", "\e[1;33m", "\e[43m"],
"LightBlue" => ["#ADD8E6" , "lightblue", "\e[1;34m", "\e[44m"],
"LightCoral" => ["#F08080" , "lightred", "\e[1;31m", "\e[41m"],
"LightCyan" => ["#E0FFFF" , "lightcyan", "\e[1;36m", "\e[46m"],
"LightGoldenRodYellow" => ["#FAFAD2" , "yellow", "\e[1;33m", "\e[43m"],
"LightGray" => ["#D3D3D3" , "gray", "\e[0;37m", "\e[47m"],
"LightGrey" => ["#D3D3D3" , "grey", "\e[0;37m", "\e[47m"],
"LightGreen" => ["#90EE90" , "lightgreen", "\e[1;32m", "\e[42m"],
"LightPink" => ["#FFB6C1" , "magenta", "\e[1;35m", "\e[45m"],
"LightSalmon" => ["#FFA07A" , "lightred", "\e[1;31m", "\e[41m"],
"LightSeaGreen" => ["#20B2AA" , "cyan", "\e[0;36m", "\e[46m"],
"LightSkyBlue" => ["#87CEFA" , "lightblue", "\e[1;34m", "\e[44m"],
"LightSlateBlue" => ["#8470FF" , "blue", "\e[0;34m", "\e[44m"],
"LightSlateGray" => ["#778899" , "darkgray", "\e[1;30m", "\e[40m"],
"LightSteelBlue" => ["#B0C4DE" , "lightcyan", "\e[1;36m", "\e[46m"],
"LightYellow" => ["#FFFFE0" , "yellow", "\e[1;33m", "\e[43m"],
"Lime" => ["#00FF00" , "lightgreen", "\e[1;32m", "\e[42m"],
"LimeGreen" => ["#32CD32" , "lightgreen", "\e[1;32m", "\e[42m"],
"Linen" => ["#FAF0E6" , "gray", "\e[0;37m", "\e[47m"],
"Magenta" => ["#FF00FF" , "magenta", "\e[1;35m", "\e[45m"],
"Maroon" => ["#800000" , "red", "\e[0;31m", "\e[41m"],
"MediumAquaMarine" => ["#66CDAA" , "cyan", "\e[0;36m", "\e[46m"],
"MediumBlue" => ["#0000CD" , "blue", "\e[0;34m", "\e[44m"],
"MediumOrchid" => ["#BA55D3" , "purple", "\e[0;35m", "\e[45m"],
"MediumPurple" => ["#9370D8" , "purple", "\e[0;35m", "\e[45m"],
"MediumSeaGreen" => ["#3CB371" , "green", "\e[0;32m", "\e[42m"],
"MediumSlateBlue" => ["#7B68EE" , "blue", "\e[0;34m", "\e[44m"],
"MediumSpringGreen" => ["#00FA9A" , "lightgreen", "\e[1;32m", "\e[42m"],
"MediumTurquoise" => ["#48D1CC" , "cyan", "\e[0;36m", "\e[46m"],
"MediumVioletRed" => ["#C71585" , "purple", "\e[0;35m", "\e[45m"],
"MidnightBlue" => ["#191970" , "blue", "\e[0;34m", "\e[44m"],
"MintCream" => ["#F5FFFA" , "white", "\e[1;37m", "\e[47m"],
"MistyRose" => ["#FFE4E1" , "gray", "\e[0;37m", "\e[47m"],
"Moccasin" => ["#FFE4B5" , "brown", "\e[0;33m", "\e[43m"],
"NavajoWhite" => ["#FFDEAD" , "brown", "\e[0;33m", "\e[43m"],
"Navy" => ["#000080" , "blue", "\e[0;34m", "\e[44m"],
"OldLace" => ["#FDF5E6" , "white", "\e[1;37m", "\e[47m"],
"Olive" => ["#808000" , "green", "\e[0;32m", "\e[42m"],
"OliveDrab" => ["#6B8E23" , "green", "\e[0;32m", "\e[42m"],
"Orange" => ["#FFA500" , "yellow", "\e[1;33m", "\e[43m"],
"OrangeRed" => ["#FF4500" , "lightred", "\e[1;31m", "\e[41m"],
"Orchid" => ["#DA70D6" , "magenta", "\e[1;35m", "\e[45m"],
"PaleGoldenRod" => ["#EEE8AA" , "yellow", "\e[1;33m", "\e[43m"],
"PaleGreen" => ["#98FB98" , "lightgreen", "\e[1;32m", "\e[42m"],
"PaleTurquoise" => ["#AFEEEE" , "lightcyan", "\e[1;36m", "\e[46m"],
"PaleVioletRed" => ["#D87093" , "lightred", "\e[1;31m", "\e[41m"],
"PapayaWhip" => ["#FFEFD5" , "white", "\e[1;37m", "\e[47m"],
"PeachPuff" => ["#FFDAB9" , "yellow", "\e[1;33m", "\e[43m"],
"Peru" => ["#CD853F" , "brown", "\e[0;33m", "\e[43m"],
"Pink" => ["#FFC0CB" , "magenta", "\e[1;35m", "\e[45m"],
"Plum" => ["#DDA0DD" , "purple", "\e[0;35m", "\e[45m"],
"PowderBlue" => ["#B0E0E6" , "cyan", "\e[0;36m", "\e[46m"],
"Purple" => ["#800080" , "purple", "\e[0;35m", "\e[45m"],
"Red" => ["#FF0000" , "red", "\e[0;31m", "\e[41m"],
"RosyBrown" => ["#BC8F8F" , "brown", "\e[0;33m", "\e[43m"],
"RoyalBlue" => ["#4169E1" , "blue", "\e[0;34m", "\e[44m"],
"SaddleBrown" => ["#8B4513" , "brown", "\e[0;33m", "\e[43m"],
"Salmon" => ["#FA8072" , "lightred", "\e[1;31m", "\e[41m"],
"SandyBrown" => ["#F4A460" , "brown", "\e[0;33m", "\e[43m"],
"SeaGreen" => ["#2E8B57" , "green", "\e[0;32m", "\e[42m"],
"SeaShell" => ["#FFF5EE" , "white", "\e[1;37m", "\e[47m"],
"Sienna" => ["#A0522D" , "brown", "\e[0;33m", "\e[43m"],
"Silver" => ["#C0C0C0" , "gray", "\e[0;37m", "\e[47m"],
"SkyBlue" => ["#87CEEB" , "lightblue", "\e[1;34m", "\e[44m"],
"SlateBlue" => ["#6A5ACD" , "blue", "\e[0;34m", "\e[44m"],
"SlateGray" => ["#708090" , "darkgray", "\e[1;30m", "\e[40m"],
"SlateGrey" => ["#708090" , "darkgrey", "\e[1;30m", "\e[40m"],
"Snow" => ["#FFFAFA" , "white", "\e[1;37m", "\e[47m"],
"SpringGreen" => ["#00FF7F" , "lightgreen", "\e[1;32m", "\e[42m"],
"SteelBlue" => ["#4682B4" , "blue", "\e[0;34m", "\e[44m"],
"Tan" => ["#D2B48C" , "brown", "\e[0;33m", "\e[43m"],
"Teal" => ["#008080" , "green", "\e[0;32m", "\e[42m"],
"Thistle" => ["#D8BFD8" , "magenta", "\e[1;35m", "\e[45m"],
"Tomato" => ["#FF6347" , "red", "\e[0;31m", "\e[41m"],
"Turquoise" => ["#40E0D0" , "cyan", "\e[0;36m", "\e[46m"],
"Violet" => ["#EE82EE" , "purple", "\e[0;35m", "\e[45m"],
"VioletRed" => ["#D02090" , "red", "\e[0;31m", "\e[41m"],
"Wheat" => ["#F5DEB3" , "brown", "\e[0;33m", "\e[43m"],
"White" => ["#FFFFFF" , "white", "\e[1;37m", "\e[47m"],
"WhiteSmoke" => ["#F5F5F5" , "gray", "\e[0;37m", "\e[47m"],
"Yellow" => ["#FFFF00" , "yellow", "\e[1;33m", "\e[43m"],
"YellowGreen" => ["#9ACD32" , "lightgreen", "\e[1;32m", "\e[42m"]
}


ANSICODE= { "reset" => "\e[0m", "bold" => "\e[1m",
"underline" => "\e[4m", "blink" => "\e[5m",
"reverse" => "\e[7m", "invisible" => "\e[8m"
}