stringColor Created by Darthfett Description: A list of hex color code globals. The purpose of this library is to give you an idea of how to use string constants and colors effectively in display text. It is not a complete list and neither will it ever be. Instead, it is simply a list made to be added to. Requirements: N/A The rest of the documentation can be found in the system code, below: JASS: library stringColor /* __________________________________________________________________________________ stringColor library, created by Darthfett - version 1.2 http://www.thehelper.net/forums/showthread.php?t=143593 Requirements -vJass compiler (such as JASSHelper) Documentation -All globals are standalone. Feel free to copy an individual global. -Credit for this library is not necessary. Feel free to use it in your map. If you feel obligated to credit me, I won't object. I only ask that you do not simply copy and paste the library as your own. -The library isn't really needed. You can get by simply by copying and pasting the globals block. You don't need to require the library in order to use this either, but 'using' the library gives more logical errors to the user if they do not have it in their map. Purpose The purpose of this library is to give you an idea of how to use string constants and colors effectively in display text. It is not a complete list and neither will it ever be. Instead, it is simply a list made to be added to. API This library provides a few hex color strings to use to color displayed text. constant string CLR_END = "|r" This string is used to end the color coded string. (Example: CLR_RED + "This is Red" + CLR_END + ", and this is white.") constant string CLR_LIGHTYELLOW ... CLR_DARKGRAY These strings are used to color text that will be displayed on the average WC3 background. They were chosen to be easier to read. (Example: call BJDebugMsg(CLR_Yellow + "Don't kill " + END + CLR_RED + "THAT!" + CLR_END) constant string PC_RED ... PC_BROWN These strings are used to color something in a player's colored text. (Example: call BJDebugMsg(PC_RED + GetPlayerName(Player(0)) + CLR_END + ": HI gUyz!") __________________________________________________________________________________ */ globals constant string CLR_END = "|r" //========================= constant string CLR_LIGHTYELLOW = "|cffffff00" constant string CLR_YELLOW = "|cffffcc00" constant string CLR_GREEN = "|cff00ff00" constant string CLR_BLUE = "|cff0000ff" constant string CLR_RED = "|cffff0000" constant string CLR_BROWN = "|cffcc9933" constant string CLR_ORANGE = "|cffff6400" constant string CLR_DARKGREEN = "|cff009600" constant string CLR_AQUA = CLR_DARKGREEN constant string CLR_DARKBLUE = "|cff000096" constant string CLR_DARKRED = "|cff960000" constant string CLR_DARKTEAL = "|cff009696" constant string CLR_DARKCYAN = CLR_DARKTEAL constant string CLR_DARKORANGE = "|cffc86400" constant string CLR_DARKGRAY = "|cff666666" constant string PC_RED = "|cffff0303" constant string PC_BLUE = "|cff0042ff" constant string PC_TEAL = "|cff1ce6b9" constant string PC_PURPLE = "|cff540081" constant string PC_YELLOW = "|cfffffc01" constant string PC_ORANGE = "|cfffeba0e" constant string PC_GREEN = "|cff20c000" constant string PC_PINK = "|cffr55bb0" constant string PC_GRAY = "|cff959697" constant string PC_LIGHTBLUE = "|cff7ebff1" constant string PC_DARKGREEN = "|cff107246" constant string PC_BROWN = "|cff4e2a04" constant string PC_GREY = PC_GRAY //========================= endglobals endlibrary FAQ: Q: Why use this library? A: Simply put, the library gives some useful, standardized constants for concatenating strings. Q: How do I get the color code for a specific player? A: Since a player's color is not linked to a player's number in every map, player color and color codes are tracked in the stringPlayer library. You'll find the function you're looking for in that library. Q: Why the unusual name? A: Since the library is part of a collection of libraries (namely, the string library), I wanted the library names to stand out from others, and at the same time look unified.