# How to make gray-colored text in ConTeXt beta?

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?
-
I think we'll need a bit of a clue on versions here –  Joseph Wright Sep 11 '12 at 8:12
I have ConTeXt version 2012.08.14. I followed the instructions here: wiki.contextgarden.net/Colors#Choosing_a_color_model –  Village Sep 11 '12 at 8:19
What about defining the colour with `\definecolor[gray:3][s=.8]`? You can also have a look at `\definepalet` –  Marco Sep 11 '12 at 8:26
I can confirm this behavior. Seems to be a regression bug. Please report this to the context mailing list. –  Aditya Sep 11 '12 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. –  phg Sep 12 '12 at 15:16

## 1 Answer

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).

-