![](https://secure.gravatar.com/avatar/c5ae4f9aa0d3a9bd5376e92b322c3e50.jpg?s=120&d=mm&r=g)
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