I must be doing something wrong. But what? Relevant part of Metapost code:
numeric Cb, Cr, Y, T, temp, graycolors; Cb := 0; Cr := 1; Y = 2; T := 3; graycolors := 15; numeric colors[][];for i = 0 upto graycolors: temp := (graycolors - i) / graycolors; colors[i][Cb] := temp; colors[i][Cr] := temp; colors[i][Y] := temp; colors[i][T] := 0; endfor def colorvalue(expr v) = cmyk(colors[v][Cb], colors[v][Cr], colors[v][Y], colors[v][T]) enddef; for i = 0 upto 15: mycmyk[i] := colorvalue(i); endfor Used with drawdot... withcolor mycymk[index]; The error from metapost is in the generation of the cmyk colors: ! terminal: >> (redpart mycmyk0,greenpart mycmyk0,bluepart mycmyk0) >> (1,1,1,0) ! Equation cannot be performed (color=cmykcolor). <to be read again> ; <for(0)> mycmyk[(EXPR0)]:=colorvalue((EXPR0)); ENDFOR startsubtitle->...:mycmyk[i]:=colorvalue(i);endfor Strangely the following does work without problems: drawdot... withcolor colorvalue(index); I got the code from the Metafun manual. Beta from ConTeXt ver: 2011.03.28 01:03 MKIV download. Something obvious I am overlooking? Hans van der Meer ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________