1

As I know, in ConTeXt stable, one can use \color[gray:3]{} to display the text inside the brackets with a very light gray color, e.g.:

\setupcolor[rgb]
\starttext
    \color[gray:3]{This is some text.}
\stoptext

After upgrading to ConTeXt beta, this no longer works in my document. \color[red]{}, however, does change the text to red.

  • Was the syntax for creating gray colors changed in recent betas?
  • How can I create a range of gray colors (from white to black) using numbers in ConTeXt?
5
  • I think we'll need a bit of a clue on versions here
    – Joseph Wright
    Commented Sep 11, 2012 at 8:12
  • I have ConTeXt version 2012.08.14. I followed the instructions here: wiki.contextgarden.net/Colors#Choosing_a_color_model
    – Village
    Commented Sep 11, 2012 at 8:19
  • What about defining the colour with \definecolor[gray:3][s=.8]? You can also have a look at \definepalet
    – Marco
    Commented Sep 11, 2012 at 8:26
  • I can confirm this behavior. Seems to be a regression bug. Please report this to the context mailing list.
    – Aditya
    Commented Sep 11, 2012 at 13:25
  • Bug aside, you can iterate through the X11 color definitions to achieve the grayscale gradient: \setupcolor [x11] \dostepwiserecurse{100}{0}{-1}{\color[gray\recurselevel]{foo\space}}. The value determines the percentage of white. Commented Sep 12, 2012 at 15:16

1 Answer 1

2

Based on the solution of Philipp Gesang of the context mailing list:

Use \setupcolor[dem] to get scaled colors.

\setupcolor[dem]

\starttext
  \framed[background=color, backgroundcolor=gray:3]{testing}
\stoptext

(I am using background color so that the result is easier to visualize).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .