On Mon, 26 Jul 2021, Gavin via ntg-context wrote:

> 2) While I’m having good luck with paths, colors are causing trouble. In the 
> data set the color information is in strings with French names of the color, 
> like “rouge.” If I hand this string to MetaPost, MetaPost doesn’t expand it 
> into a color. It does work if it is a native color, like “red,” but not if it 
> is a defined color and not if the color is in a Lua variable. Any suggestions?

\definecolor[rouge][red] should work. A better option will be use color 
palettes. 

This is very old code, but will give an idea of how to use palettes:
https://github.com/adityam/visualcounter/blob/master/visualcounter.pdf 
Effectively all you need to do is add \setuppalet[name] at an appropriate 
place, and then the user can easily change the colors (rather than having them 
specified as part of data files).

Aditya
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to