• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Colors

Status
Not open for further replies.
Level 29
Joined
Mar 10, 2009
Messages
5,016
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 = 10
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] = "|cff7D053F"    //Deep PInk 4
    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] = "|cffD2B9D3"    //Thistle
    set Color[27] = "|cffE3E4FA"    //Lavender
    set Color[28] = "|cffFDEEF4"    //Lavender Blush
    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
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
 
Last edited:
Level 12
Joined
Oct 7, 2010
Messages
447
I'm not very sure on what you're asking. The question is kinda confusing. Well, that's just my opinion. Anyway, by my understanding, you're requesting color codes for the next 40 codes. If that's the case, try and check out this link.

Or do you mean you can't add anymore colors?
 
Status
Not open for further replies.
Top