- Joined
- Mar 10, 2009
- Messages
- 5,016
Well, this is just a collection of colors for your texts...
Demo:
JASS:
/*
ColorUtils
Created by Mckill2009
Applies 50 colors to your texts
Source site:
[url]www.computerhope.com/htmcolor.htm[/url] (credits to ALONE for providing this site)
*/
library ColorUtils initializer init
globals
private string array Color
private integer MaxColor = 50
endglobals
private function ColorSetup takes nothing returns nothing
set Color[0] = "|cffff0000" //red
set Color[1] = "|cff0000ff" //blue
set Color[2] = "|cff00f5ff" //Teal
set Color[3] = "|cff551A8B" //Purple
set Color[4] = "|cffffff00" //Yellow
set Color[5] = "|cffEE9A00" //Orange
set Color[6] = "|cff00CD00" //Green
set Color[7] = "|cffFF69B4" //Pink
set Color[8] = "|cffC0C0C0" //Gray
set Color[9] = "|cffB0E2FF" //Light Blue
set Color[10] = "|cff006400" //Dark Green
set Color[12] = "|cff342D7E" //State Blue
set Color[13] = "|cff2B60DE" //Royal Blue
set Color[14] = "|cff3BB9FF" //Deep Sky Blue
set Color[15] = "|cff25587E" //Deep Sky Blue 4
set Color[16] = "|cff8D38C9" //Violet
set Color[17] = "|cffF52887" //Deep Pink
set Color[18] = "|cff437C17" //Chartreuse4
set Color[19] = "|cff800517" //Firebrick
set Color[20] = "|cff810541" //Maroon
set Color[21] = "|cffFF00FF" //Magenta
set Color[22] = "|cffB048B5" //Medium Orchid
set Color[23] = "|cff6A287E" //Medium Orchid 4
set Color[24] = "|cff8E35EF" //Purple
set Color[25] = "|cffB93B8F" //Plum
set Color[26] = "|cffC3FDB8" //Dark Sea Green1
set Color[27] = "|cffE3E4FA" //Lavender
set Color[28] = "|cffAF7817" //Dark Goldenrod
set Color[29] = "|cff00FFFF" //Cryan
set Color[30] = "|cff43C6DB" //Turquoise
set Color[31] = "|cff82CAFF" //Sky Blue
set Color[32] = "|cff4E8975" //Sea Green
set Color[33] = "|cff254117" //Dark Green
set Color[34] = "|cffA52A2A" //Brown
set Color[35] = "|cffC0C0C0" //Silver
set Color[36] = "|cff808000" //Olive
set Color[37] = "|cffFF00FF" //Fuchsia
set Color[38] = "|cff00FF00" //Lime
set Color[39] = "|cffF76541" //Coral
set Color[40] = "|cffFFF8C6" //Lemon Chiffon
set Color[41] = "|cffB38481" //Rosy Brown
set Color[42] = "|cff7D2252" //Hot Pink4
set Color[43] = "|cffF660AB" //Hot Pink
set Color[44] = "|cffC85A17" //Chocolate
set Color[45] = "|cffD4A017" //Gold
set Color[46] = "|cffE18B6B" //Dark Salmon
set Color[47] = "|cff8A4117" //Sienna
set Color[48] = "|cffADA96E" //Khaki
set Color[49] = "|cff8AFB17" //Chartreuse
set Color[50] = "|cffADDFFF" //Light Blue
//set Color[51] = "|cff" //
endfunction
function RandomColor takes string s returns string
return Color[GetRandomInt(0, MaxColor)] + s +"|r"
endfunction
function FixedColor takes integer colorindex, string s returns string
return Color[colorindex] + s +"|r"
endfunction
private function init takes nothing returns nothing
call ColorSetup()
endfunction
endlibrary
Demo:
JASS:
scope ColorU initializer init
globals
private integer I = 0
endglobals
function TestColors takes nothing returns nothing
call BJDebugMsg(FixedColor(I,"COLOR OF = "+I2S(I)))
set I = I+1
if I >= 51 then
call DestroyTrigger(GetTriggeringTrigger())
endif
endfunction
function init takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterTimerEvent(t, 1, true)
call TriggerAddAction(t, function TestColors)
endfunction
endscope