Colour Text

Colour Text

Postby ccenturionnMC » 27 Aug 2013, 17:29

When I've been on servers I've seen people writing in colour. I asked them how to do it and many other people but no one seems to want to tell me how so I've come here in search of something more helpful. So what I would like to know is how to write in colour and what are the codes for basic colours e.g. red, yellow, green, blue, purple and if you feel like it any others.

Thx/ccenturionnMC
ccenturionnMC
 
Posts: 8
Joined: 27 Aug 2013, 17:24

Re: Colour Text

Postby Ulukai » 27 Aug 2013, 19:14

I'm on my phone so it's a bit hard to look it up for you right now, but there is even a small mod for RE available to choose your chat colour with a gui. Search this forum for something like colour chat and you will find it. Zeroknight is the author of the mod. I'm not sure if it is still compatible with RE v1.4. There surely are other forum topics here where you will find the necessary linesfor your RE config as well.
User avatar
Ulukai
 
Posts: 741
Joined: 19 Mar 2011, 10:55
Location: Mechelen, Belgium

Re: Colour Text

Postby ccenturionnMC » 27 Aug 2013, 19:50

This helped a lot thank you very much. Also, love your maps.
ccenturionnMC
 
Posts: 8
Joined: 27 Aug 2013, 17:24

Re: Colour Text

Postby Unnamed » 27 Aug 2013, 19:59

You have to use the /say or /sayteam command. Then you have to write ^f and the next character is the colour (r for red, y for yellow,...). For example /say "^fctest".
Insted of a character you can write something like ^f[0xAA80AA] (hexadecimal).
With ^fz (instead of ^f) and two colours you can make text with alternating colour.
Unnamed
 
Posts: 189
Joined: 05 May 2013, 18:16

Re: Colour Text

Postby ballist1c » 27 Aug 2013, 20:16

put the bind in your autoexec, so that you dont have to type it every time, that is quite silly :P
Image Joseph "ballist1c" Calabria

Bloodlust // Abuse // Insidious // Longest Yard 2000
User avatar
ballist1c
 
Posts: 449
Joined: 24 Jul 2012, 02:32
Location: Connecticut (USA) [East Coast]

Re: Colour Text

Postby ccenturionnMC » 28 Aug 2013, 02:14

So could someone please tell me how to bind it so I can write in red all the time?
ccenturionnMC
 
Posts: 8
Joined: 27 Aug 2013, 17:24

Re: Colour Text

Postby ballist1c » 28 Aug 2013, 03:21

ccenturionnMC {l Wrote}:So could someone please tell me how to bind it so I can write in red all the time?


ballist1c {l Wrote}:put the bind in your autoexec, so that you dont have to type it every time, that is quite silly :P


...
Image Joseph "ballist1c" Calabria

Bloodlust // Abuse // Insidious // Longest Yard 2000
User avatar
ballist1c
 
Posts: 449
Joined: 24 Jul 2012, 02:32
Location: Connecticut (USA) [East Coast]

Re: Colour Text

Postby qreeves » 28 Aug 2013, 03:27

Someone make a ticket for the ability to set chat colour, I'll put it in for 1.5.

For the location of config files and how to use them, please see our wiki.
Quinton "quin" Reeves | Lead Developer, Red Eclipse | http://redeclipse.net/ | http://www.facebook.com/redeclipse.net
User avatar
qreeves
 
Posts: 1294
Joined: 17 Mar 2011, 03:46
Location: Queensland, Australia

Re: Colour Text

Postby Dratz-_C » 28 Aug 2013, 03:50

User avatar
Dratz-_C
 
Posts: 409
Joined: 03 Mar 2012, 00:13
Location: North Carolina, United States of America

Re: Colour Text

Postby ccenturionnMC » 28 Aug 2013, 04:49

Unnamed {l Wrote}:You have to use the /say or /sayteam command. Then you have to write ^f and the next character is the colour (r for red, y for yellow,...). For example /say "^fctest".
Insted of a character you can write something like ^f[0xAA80AA] (hexadecimal).
With ^fz (instead of ^f) and two colours you can make text with alternating colour.

So what letter would be a dark red and a black?
No idea, but use the hexadecimal values instead as Unnamed mentioned in the 3rd reply to your post.
Find your hexadecimal values here: http://www.w3schools.com/tags/ref_colorpicker.asp
ccenturionnMC
 
Posts: 8
Joined: 27 Aug 2013, 17:24

Re: Colour Text

Postby bonifarz » 28 Aug 2013, 08:12

ccenturionnMC {l Wrote}:So what letter would be a dark red and a black?

http://en.wikipedia.org/wiki/Web_colors#Hex_triplet

E.g. maroon 0x800000 is a dark red, but I would NOT use a dark color for chat that gives poor contrast and will be hard to read.

I agree that this question is asked quite frequently by new players.
Some like to have the same color for chat as for the profile:
{l Code}: {l Select All Code}
bind "RETURN" [saycommand "^f["(getcolour -1)"]"]

So i guess a button to grab the profile color could be added to the ticket.
User avatar
bonifarz
 
Posts: 379
Joined: 09 Apr 2012, 12:16
Location: switzerland

Re: Colour Text

Postby Dratz-_C » 29 Aug 2013, 04:16

Bonifarz,
I added your example along with a comment that ZeroKnights "Chat Colours GUI" might also be useful to take a look at, even if guinoautotab doesn't work anymore.
Cheers
User avatar
Dratz-_C
 
Posts: 409
Joined: 03 Mar 2012, 00:13
Location: North Carolina, United States of America

Re: Colour Text

Postby ZeroKnight » 29 Aug 2013, 04:55

I haven't touched up my personal stuff in quite a while, as the only creation-related things I've been doing are going to development toward RE itself. I'll touch up and add a thing or two to my chat color GUI, and see if quin wouldn't mind adding it to the profile section for official inclusion. I'll go through and attempt to improve/optimize it a bit as well (better structure of gui code itself, and better use of vars for remembering color (perhaps keep everything in a single list, and each index will be a color setting)).

qreeves {l Wrote}:Someone make a ticket for the ability to set chat colour, I'll put it in for 1.5.

For the location of config files and how to use them, please see our wiki.

If you're up for it, and since I already have such a menu created, I can optimize and clean it up if you'd like me to slap it in the profile section. Plus, I know how much you detest making GUIs, and I somewhat enjoy doing it.

Dratz-_C {l Wrote}:I added your example along with a comment that ZeroKnights "Chat Colours GUI" might also be useful to take a look at, even if guinoautotab doesn't work anymore.

Yes, guinoautotab was deprecated (its effect is inferred and permanent now) sometime before 1.4, as it is pretty useless for RE's menus. Assuming I'm not overlooking any other var changes/misc things, simply removing the surrounding guinoautotab block(s) will make the script work.
[ Github ][ WazuClan -- irc.wazuclan.com #wazuclan ][ Zero's Archive of RE Extensions, Scripts, WeapMods & More! ]
User avatar
ZeroKnight
 
Posts: 524
Joined: 08 Jun 2011, 01:24
Location: Ohio, United States

Re: Colour Text

Postby Dratz-_C » 29 Aug 2013, 06:27

Indeed it does work, with some other warnings. I am happy you are willing to help, ZeroKnight! We'll see what Quin says.
Cheers
User avatar
Dratz-_C
 
Posts: 409
Joined: 03 Mar 2012, 00:13
Location: North Carolina, United States of America

Re: Colour Text

Postby cg505 » 02 Sep 2013, 21:31

I'm using svn, and I've noticed that my own chats are the color of my weapon. It seems like this is a very recent change, but I don't think I've set any variables. To me, it's a little over the top to have colors flying everywhere, so I'm wondering why this happens and is there a setting to turn it off, and if not, why/where is the code that I can comment out.

Sorry for the badly worded sentence.
cg505
 
Posts: 3
Joined: 24 Aug 2013, 16:16

Re: Colour Text

Postby TheLastProject » 02 Sep 2013, 22:20

cg505 {l Wrote}:I'm using svn, and I've noticed that my own chats are the color of my weapon. It seems like this is a very recent change, but I don't think I've set any variables. To me, it's a little over the top to have colors flying everywhere, so I'm wondering why this happens and is there a setting to turn it off, and if not, why/where is the code that I can comment out.

Sorry for the badly worded sentence.

The code for it isn't done yet, so it's not doing quite what it should be. I'd recommend to just have some patience.
Hats, Afros, wings and raptor feet. This game is showing progress indeed.
TheLastProject
 
Posts: 432
Joined: 06 Nov 2011, 17:04

Re: Colour Text

Postby qreeves » 03 Sep 2013, 03:47

Ah yes, should be off by default. Sorry.
Quinton "quin" Reeves | Lead Developer, Red Eclipse | http://redeclipse.net/ | http://www.facebook.com/redeclipse.net
User avatar
qreeves
 
Posts: 1294
Joined: 17 Mar 2011, 03:46
Location: Queensland, Australia

Re: Colour Text

Postby bonifarz » 17 Sep 2013, 17:27

Recently i was asked how to use cubescript to render chat messages with colorgradients.
Not really useful for anything, but a somewhat funny waste of time to implement.
Some people use a script based on the color formats ^f1 ^f2 etc., but I have not seen that one yet.

Question: Is there a simple way to concatenate all arguments of an alias?
Using quotation marks for chat is just as annoying as the colors are useless :lol:

EDIT: I have found a method that is the opposite of elegant, but seems to work.
However, i just realize that the characters limit for chat lines is the real problem here:
hues.jpeg
hues.jpeg (19.94 KiB) Viewed 10426 times

But maybe the code snippets will be useful for some gui elements, e.g. for picking a saturated color based on its hue.

{l Code}: {l Select All Code}
// hue color scripts by bonifarz

colorstep = 8 // the larger the step size, the smaller the palette of hues in use
ccount = 0 // just a counter

colorfromhue = [  // color by hue = $arg1*60° + $arg2/255*60°
    hi = $arg2
    hd = (- 255 $hi)
    case $arg1 0 [ // red to yellow
        result (+ 0xff0000 (* $hi 0x000100))
    ] 1 [  // yellow to green
        result (+ 0x00ff00 (* $hd 0x010000))
    ] 2 [ // green to cyan
        result (+ 0x00ff00 (* $hi 0x000001))
    ] 3 [ // cyan to blue
        result (+ 0x0000ff (* $hd 0x000100))
    ] 4 [ // blue to magenta
        result (+ 0x0000ff (* $hi 0x010000))
    ] 5 [ // magenta to red
        result (+ 0xff0000 (* $hd 0x000001))
    ]
]

newgui rainbowchatinfo [
    guitext "Usage: /rainbowchat message"
    guitext "Note: Only ~150/12 chars per line."
    guitext "Author: Bonifarz."
    guilist [
        guitext "Test the color stepsize: "
        guifield colorstep 2
    ]
    loop h6 5 [
        guilist [
            loop i (div 255 $colorstep) [
                h256 = (* $i $colorstep)
               
                guitext (concatword "^f[" (colorfromhue $h6 $h256) "]*")
            ]
        ]
    ]
]

rainbowchat = [
    msg = ""
    argi = "arg1"
    loopwhile i 25 [ (strlen $$argi) ] [
        argi = (concatword "arg" (+ 1 $i) )
        msg = (concat $msg $$argi)
    ]
    echo "DEBUG: msg is"
    echo $msg
    saycommand (loopconcatword i (strlen $msg) [
       ccount = (+ $colorstep $ccount)
       h256 = (mod  $ccount 256)
       h6 = (mod (div $ccount 256) 6)
       result (concatword "^f[" (colorfromhue $h6 $h256) "]" (substr $msg $i 1) )
    ] )
]

setcomplete "rainbowchat" 1
showgui rainbowchatinfo
User avatar
bonifarz
 
Posts: 379
Joined: 09 Apr 2012, 12:16
Location: switzerland

Who is online

Users browsing this forum: No registered users and 1 guest

cron