Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Fri Jan 23, 2004 8:54 pm   

Colors
 
Would like to know where to gewt ahold of the colors for zmud ver 6.62
I type %colorname(yellow)
i get the number 65535
now when I put that into a show like this
#show %ansi(65535)Hello
I get a grey background with white letter saying Hello

Is there another way to do this without using #MXP ?
Or Is there another reference than the one in the help files?

I have resorted to scoring the internet for the answeres but hopefully someone will now more about it here.
Thanks
Reply with quote
Guede
Wanderer


Joined: 30 Nov 2003
Posts: 65
Location: United Kingdom

PostPosted: Fri Jan 23, 2004 9:35 pm   
 
Use %color and the name of the colour rather than %colorname.

%color(yellow) (returns 14 btw)
and
#SHOW %ansi(14)Hello

works as expected.
You can even put them in the same line:

#SHOW %ansi(%color(yellow))Hello

-G-
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Jan 23, 2004 9:50 pm   
 
The MXP colors don't work with the %ansi function. It only supports the colors and attributes listed under %color.

The number returned by the %colorname function is the decimal value of a BGR hexadecimal color. Since this is backwards and in the wrong base it's not much help for finding RGB numbers. The function doesn't have much practical use, but the list of colors is helpful.

ADDED: Should point out that you don't actually need to use any numbers with %ansi.
#SHOW %ansi( yellow)hello
works quite well.
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Sun Jan 25, 2004 12:33 am   
 
Lightbulb
yes I know that %ansi(yellow)hello works fine it was just an example
But I was hoping to exapnd it to grey,lemon,peach,shadowgrey, and basicaly all the listed names in %colorname

Gueded
I know if I want the BASIC colors just to put there name in, thanks

Now what I want is to be able to actualy use the %colorname in a show or in a alias without having to use #mxp to show it.

I can use %ansi but I am limited and I can use #mxp and get abetter selection, but is abit more work to code.
What I wanted was another way to use the %colornames or if anyone new where to get the BGR color names from.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Jan 25, 2004 5:58 pm   
 
#MXP is probably your best choice.

You could use temporary triggers in conjunction with #SHOW as a workaround. However this won't save much work unless you are only using one color.
#AL showcol {#TEMP {%-2} {#CW %1};#SHOW %-2}

You should also check whether the latest beta version has expanded %ansi's capabilities (I don't think it has). If it hasn't, it might be worth suggesting.
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Mon Jan 26, 2004 10:08 am   
 
What I am ending up doing is making my own chart for this using %ansi to get the job done.

I also decided I wanted a list of all the %char and made a #loop to give them all to me. it was pretty neat to see what all I can get from zmud.

The colors are a bit harder it seems that there are strikes blinkin bakground foreground italic
so its just a matter of deciding what I want
and also useing one number will get me a forground and background that are the same color, this is usfull for making colorfull displays with just a space.

One I lock down the colors I am going to try my hand at making pictures, will be a bit blocky seeing as the background color will always be the hight of the line and ' is about the slimist thing on the keyboard.

Thanks for all your help.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Jan 26, 2004 7:18 pm   
 
If you want an explanation of the numbers used by %ansi, see the online 5.55x help for #COLOR. The other attributes (strikeout, underline, blink, highlight, reverse) work the same as bold but you'll have to figure out the base number for each yourself. This can be done using the %color function.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net