Further experimentation has shown that it is not impossible to color \vrule's, thus \blackrule is not specifically needed. Let me first mention that I put the colored rules away with \setbox\B=\hbox{} and then later call \B up. It is a pity until now I am not able to concoct a minimal example showing consistently the behaviour. However I have made the following observations: define: \definecolor[mycolor][r=myR,g=myG,b=myB] (1) \color[mycolor]{rule} typesets a black rule (2) \color[red]{something}\color[mycolor]{rule} typesets a mycolor rule (3) \definecolor[green][r=myR,g=myG,b=myB]\color[mycolor]{rule} typesets a mycolor rule (4) changing the values of myR,myG,myB between runs keeps typesetting the old mycolor (5) it seems there is a memory effect on defined colors, something with a cache that keeps me from changing things. It is mainly the seemingly erratic behaviour of the color changes that puzzles me. I seem not being able to pinpoint a culprit. Hans van der Meer On 21 jan 2010, at 22:24, Aditya Mahajan wrote:
On Thu, 21 Jan 2010, Hans van der Meer wrote:
ConTeXt ver: 2010.01.19 23:29 MKIV fmt: 2010.1.20 int: english/ english
Coloring hrule's and vrule's with \color[aColor]{\vrule heightdepthwidth} works only if aColor is one of the standardcolors like red, blue, gray, etc. But defining other colors don't color the rule \definecolor[mygray] [r=.6,g=.7,b=.7]\color[mygray]{\vrule heightdepthwidth} typesets the rule in black, not in mygray. The strange is that the lines around \framed[framecolor=mygray] do get colored correctly.
How can I accomplish the general coloring of vrule's and hrule's?
\blackrules.
%D \macros %D {blackrules} %D %D One can call for a sequence of black rules, if needed %D equally spaced over the given width. %D %D \showsetup{blackrules} %D %D The two alternative calls are therefore: %D %D \startbuffer %D Tell me, is this according to the \blackrules[n=6]? %D These \blackrules[alternativevariant=b,n=10,distance=. 2em,width=4cm] are quite clear. %D \stopbuffer
Despite its name, \blackrules can be of any color. The default options are
\setupblackrules [\c!n=3, \c!width=1em, \c!height=1ex, \c!depth=\!!zeropoint, \c!alternative=\c!a, \c!distance=.25ex, \c!color=]
Aditya