MXP Color Element

Posted by Bobo on Fri 22 Jan 2010 07:38 AM — 2 posts, 13,718 views.

USA #0
I'm having issues defining and using custom colors with the <COLOR> MXP tag. Right now I'm penned in with
	#define HTML_WHITE "#FFFFFF"
...

(in MXP definitions):
write_to_buffer( d, MXPTAG ("!ELEMENT Col '<color &text;>'" "ATT='name #AAAAAA'"), 0);
(#AAAAAA is set as a 'default' for HTML) but I've got no working out of using the MXPTAG

 MXPTAG("Col" HTML_WHITE)

OR

MXPTAG("Col #FFFFFF")


Any ideas where I'm screwing up at?

Australia Forum Administrator #1
Have you read this page?

http://www.gammon.com.au/mushclient/addingservermxp.htm

And this page?

http://www.gammon.com.au/forum/?id=238

All MXPTAG does is put < and > around what you have as an argument, so the output of:


MXPTAG("Col #FFFFFF")


would be:


<Col #FFFFFF>


However you really want something looking like this:


<color fore='#fff8dc' back='#0000ff'>This is cornsilk on blue</color>