1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Ride into the sunset with the 32nd Modeling Contest.
    Dismiss Notice
  4. This adventure has come to an end. Congratulate our heroes in the 16th Mini Mapping Contest Results.
    Dismiss Notice
  5. From the gates of hell, the 5th Special Effect Contest Results have emerged.
    Dismiss Notice
  6. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Colored Text

Discussion in 'World Editor Help Zone' started by Lee_Go, Nov 3, 2009.

  1. Lee_Go

    Lee_Go

    Joined:
    May 1, 2009
    Messages:
    156
    Resources:
    0
    Resources:
    0
    I have a question on how to get different colored texts besides yellow. How do I know the code to put in a description box?
     
  2. DragoonZombie

    DragoonZombie

    Joined:
    Mar 24, 2005
    Messages:
    436
    Resources:
    3
    Models:
    1
    Icons:
    1
    Tutorials:
    1
    Resources:
    3
    The color codes are like this:
    |cff000000Text|r
    This will return: Text

    Their structure is like this: |cffRRGGBBText|r

    So, if you would like to have, for example, the text being red it will look like this:
    |cffff0000Text|r

    There are alot of Colorizer tools out there, where you type in smth, choose your color and then press generate. It will give you the desired results.
    JNGP even has a integrated colorizer inside the object editor.
     
  3. manstie

    manstie

    Joined:
    Mar 10, 2008
    Messages:
    847
    Resources:
    1
    Maps:
    1
    Resources:
    1
    We can change the colour of: Tooltips, Messages, Dialogs, Map names, Ability descriptions, and basically anything else that is identified as text (type: string) in Warcraft 3.
    Hex numbers:

    The hexadecimal system uses 16 numeric characters: 0 1 2 3 4 5 6 7 8 9 A B C D E F
    Numbers 0 through 9 are just like our regular numbers. Then there are 6 extra characters, represented by letters A through F. A=10 B=11 C=12 D=13 E=14 F=15

    Using just two digits, you can express 256 different numbers in hex:

    Code (Text):
    0=00 1=01 2=02 3=03 4=04 5=05 6=06 7=07 8=08 9=09 10=0A 11=0B 12=0C 13=0D
    14=0E 15=0F 16=10 17=11 18=12 19=13 20=14 21=15 22=16 23=17 24=18 25=19 26=1A 27=1B
    28=1C 29=1D 30=1E 31=1F 32=20 33=21 34=22 35=23 36=24 37=25 38=26 39=27 40=28 41=29
    42=2A 43=2B 44=2C 45=2D 46=2E 47=2F 48=30 49=31 50=32 51=33 52=34 53=35 54=36 55=37
    56=38 57=39 58=3A 59=3B 60=3C 61=3D 62=3E 63=3F 64=40 65=41 66=42 67=43 68=44 69=45
    70=46 71=47 72=48 73=49 74=4A 75=4B 76=4C 77=4D 78=4E 79=4F 80=50 81=51 82=52 83=53
    84=54 85=55 86=56 87=57 88=58 89=59 90=5A 91=5B 92=5C 93=5D 94=5E 95=5F 96=60 97=61
    98=62 99=63 100=64 101=65 102=66 103=67 104=68 105=69 106=6A 107=6B 108=6C 109=6D 110=6E 111=6F
    112=70 113=71 114=72 115=73 116=74 117=75 118=76 119=77 120=78 121=79 122=7A 123=7B 124=7C 125=7D
    126=7E 127=7F 128=80 129=81 130=82 131=83 132=84 133=85 134=86 135=87 136=88 137=89 138=8A 139=8B
    140=8C 141=8D 142=8E 143=8F 144=90 145=91 146=92 147=93 148=94 149=95 150=96 151=97 152=98 153=99
    154=9A 155=9B 156=9C 157=9D 158=9E 159=9F 160=A0 161=A1 162=A2 163=A3 164=A4 165=A5 166=A6 167=A7
    168=A8 169=A9 170=AA 171=AB 172=AC 173=AD 174=AE 175=AF 176=B0 177=B1 178=B2 179=B3 180=B4 181=B5
    182=B6 183=B7 184=B8 185=B9 186=BA 187=BB 188=BC 189=BD 190=BE 191=BF 192=C0 193=C1 194=C2 195=C3
    196=C4 197=C5 198=C6 199=C7 200=C8 201=C9 202=CA 203=CB 204=CC 205=CD 206=CE 207=CF 208=D0 209=D1
    210=D2 211=D3 212=D4 213=D5 214=D6 215=D7 216=D8 217=D9 218=DA 219=DB 220=DC 221=DD 222=DE 223=DF
    224=E0 225=E1 226=E2 227=E3 228=E4 229=E5 230=E6 231=E7 232=E8 233=E9 234=EA 235=EB 236=EC 237=ED
    238=EE 239=EF 240=F0 241=F1 242=F2 243=F3 244=F4 245=F5 246=F6 247=F7 248=F8 249=F9 250=FA 251=FB
    252=FC 253=FD 254=FE 255=FF
    Building a colour code:

    A colour code has the following parts:

    * (4) The starting tag is always |cff. |c means start the colour and ff would be the alpha value, but since texts cannot have transparency, these 2 characters are actually obsolete.
    * (2) Red tone, determines how much red is in the colour 00-ff
    * (2) Green tone, determines how much green is in the colour 00-ff
    * (2) Blue tone, determines how much blue is in the colour 00-ff
    * (x) The text itself, can be of any length.
    * (2) The closing tag is |r it turns the text colour back to white, can be omitted, acts exactly like |cffffffff.

    In one sentence: Colours are applied with |cTTRRGGBBx|r, where |c starts the colour, TT is useless, RR is red, GG is green, BB is blue, x is the coloured text itself and |r stops the colour.
    Common Colours:

    Code (Text):
    |cffff0000Red|r
    |cff0000ffBlue|r
    |cff00ffffTeal|r
    |cff550088Purple|r
    |cffffff00Yellow|r
    |cffff8800Orange|r
    |cff00ff00Green|r
    |cffee55bbPink|r
    |cff999999Gray|r
    |cff77bbffLight Blue|r
    |cff116644Dark Green|r
    |cff552200Brown|r
    and
    |cffffcc00Hotkey (Gold colour)|r
    Rainbow colours:

    Many people use programs for generating colourful texts because they can't or don't want to understand how warcraft works. You can get colouring tools from the Tools Section. One that I use is http://www.hiveworkshop.com/forums/tools-560/colourizer-v0-3c-135506/ which can colourize other things too!
    Standards:

    There is no official standard for colour code format, I have seen them in lower-, upper- and even mixed-case. I suggest using lowercase hex codes, because all Blizzard-made tooltips are in lowercase and XHTML strictly enforces lowercase hex codes as well.
     
  4. Lynxxx

    Lynxxx

    Joined:
    Jan 5, 2009
    Messages:
    46
    Resources:
    0
    Resources:
    0