ID:272855
 
Well I wanted to change the size and color of this code!


mob
verb
smile()
world >> "[usr] grins"

As an example that is.How would I do that I would like to make it bigger and turn it red.Please help.
S epheriku wrote:
Well I wanted to change the size and color of this code!


mob
verb
smile()
world >> "[usr] grins"

As an example that is.How would I do that I would like to make it bigger and turn it red.Please help.

mob
verb
smile()
world << "<font color=red><font size=2>[usr] grins"



You put the ">>" the wrong way.
In response to Kurma
Using html tags you can make text colorful.

<font color="color">//Change the second "color" to the color you want.


Certain colors you can use the names, other you need the hex code.
The color names you can use are:
  • Aqua
  • Navy
  • Black
  • Olive
  • Blue
  • Purple
  • Fuchsia
  • Red
  • Gray
  • Silver
  • Green
  • Teal
  • Lime
  • White
  • MaroonYellow


You can find hex codes here, if you want a wider color range, then you need to search for hex codes.

Examples:
<font color=red>
<font color=green>
<font color=#FF0000>//Hex code for red
<font color=#00FF00>//Hex code for green


Making a verb that changes the font color is quite simple as well. You need to make a variable for the color, then make a verb, the code is shown below:
mob/verb
Name_Color(C as color)
usr.name_color = C
mob/var
name_color = "black"


mob/verb
Smile()
usr << "<font color=[usr.name_color]>[usr] smiles! :)"


Hope this helps.
In response to Howey
Of course, you can also use the widely-misunderstood rgb() proc to denote colors (by hex code), as that's its very purpose.
usr << "<font color='[rgb(1,2,3)]'>'AAAAAA</font>"