|
Yaldair Novice
Joined: 10 May 2003 Posts: 37 Location: Netherlands
|
Posted: Tue May 08, 2007 10:03 pm
%eval making everything a light yellowish [v1.33] |
Hey,
I had a trigger that would color certain names into a bold red color, using:
#cw %eval(%color(bold)+%color(red))
(This from memory, believe it to be correct).
That used to work up to v1.32, but after updating to v1.33 everything that was used in that matter (using the %eval, with different colors), became a light yellowish color.
Using #cw bold,red would work.
Anyone able to confirm this on their part? |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Tue May 08, 2007 10:52 pm |
Confirmed. It seems like the numeric value for bold is off. It look like it should 64, but it's currently set to 128.
I'm not 100% sure though.
Try this (as temp work around) and see it does what you want.
#cw %eval(64 +%color(red))
[Edit] I stand corrected. I checked in 1.32 and bold was 128 also... so it must be getting interpreted differently in this version. the workaround should still work for you though. |
|
_________________ Asati di tempari! |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu May 10, 2007 7:27 pm |
I have reproduced the problem with color numbers and have added it to the bug list.
But I'm not sure why you are using %eval since just doing:
#CW bold,red
should work. I'm trying to discourage the use of color numbers instead of names, since the numbers are left over from the old ANSI 16-color days. However, it's on the bug list for the future. |
|
|
|
Zwartje Novice
Joined: 08 Feb 2007 Posts: 45
|
Posted: Mon May 14, 2007 7:21 pm |
Well, I wouldnt be against converting all my color numbers into names.
However, I am used to a certain color schema, therefor I wonder if there is an easy way to see in what name a number translates? |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon May 14, 2007 9:31 pm |
I believe either %color() or %colorname() is the function you want.
Really, the best piece of advice I ever got regarding any sort of coding work was to simply spend time puttering around in the helpfile and associated tools (ie, the command/function wizard). I've run into zillions of problems during my use of zmud/cmud and all but maybe 12 things were easily answered by a quick browse through at least the command/function wizard. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Zwartje Novice
Joined: 08 Feb 2007 Posts: 45
|
Posted: Tue May 15, 2007 11:10 am |
if you're answer is implying 'RTFM', I actually did look in the helpfiles. I only found functions that give the opposite from what I want.
What I want:
#show %colorwishfunc(12)
outputs bright,red (or whatever)
From the help files:
#SHOW %color(red,magenta)
outputs 84
#SHOW %colorname(red)
returns 255
To be honest, I dont understand the difference between these 2 color functions, but from the examples it tells me this is not doing what i want, but the opposite |
|
|
|
|
|