ID:149887
 
Hey everyone, its been a while. I got 2 questions which revolve around the color in Byond. Each of which I have been trying to work at, but dont seem to be getting anywhere too far..

#1.. you know how you have for example in chat (\red test) and test appears in red? is there any possible way instead of writing \red making it something simpler like {R and without the need of putting a space inbetween the color code and the text? (if you put \redtext it gives you an error on DM and in DS it doesnt show up at all..).

#2.. Adding on to the first question, is there any way to add new colors into my code through the rgb proc or something similiar? Adding different types like {R would be the default red and {r would be a darker red?

I have spent the last 2-3 weeks only working on this.. no luck. How would one go about by doing this?
I think you can solve both of your problems by abandoning the built-in macros, and just using the HTML font tag. For example:
<FONT COLOR=Red>Text</FONT>
<FONT COLOR=#500000">Dark Red Text</FONT>
<FONT COLOR=Yellow>Yellow Text</FONT>

Which looks like:
<FONT COLOR=Red>Text</FONT>
<FONT COLOR=#500000">Dark Red Text</FONT>
<FONT COLOR=Yellow>Yellow Text</FONT>

-AbyssDragon
In response to AbyssDragon
That knocked off one problem.. any idea how I could make it so its {R or &R though and not having to type in that whole thing every time I wanna change a color?
In response to Goku401
Stop being lazy, and use html. Dan said they were taking about the color macros anyways.
In response to Nadrew
Hmm, perhaps going into it and explaining why I want this may be easier.. no doubt.
A) I havent been online for the last month or two so I am not up to date on all the current changes that are being considered by byond
B) its not that I am lazy, I am trying to make this for In-Game situations, I am quite aware or using the html way codewise and I will continue to do so, but I want players to have it easier in the game, as in if they say something and they wanna say it with multiple colors.. it would be kinda annoying to do so by using the html method. (ie. say &RT&Ye&Rs&Yt)
In response to Goku401
Goku401 wrote:
[snip]
B) its not that I am lazy, I am trying to make this for In-Game situations, I am quite aware or using the html way codewise and I will continue to do so, but I want players to have it easier in the game, as in if they say something and they wanna say it with multiple colors.. it would be kinda annoying to do so by using the html method. (ie. say &RT&Ye&Rs&Yt)

It sounds like it is a matter of text filtering at this point. Some of the libraries have filtering capabilities. If they are not what you are looking for, they at least might be good examples for making your own.